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) {