From c6b92d60e7c829ccf107db1d70f1ccae9609a639 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sun, 7 Aug 2016 12:45:47 +1000 Subject: [PATCH] another ssh fix --- bbs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bbs.c b/bbs.c index da16dd3..698e261 100644 --- a/bbs.c +++ b/bbs.c @@ -207,10 +207,11 @@ char s_getchar() { c = getchar(); } else { len = read(gSocket, &c, 1); + + if (len == 0) { + disconnect("Socket Closed"); + } } - if (len == 0) { - disconnect("Socket Closed"); - } if (!sshBBS) { while (c == 255) {