X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Ftextclient%2Fclient_chat.c;h=7bf21af225e3e7ba7e618626c17bfeefa2323686;hp=dbe0ce900f40503e7232f89e973177648247fec0;hb=686a8267f3ad753143303673e21dfed5cb314447;hpb=5c8d4ddb559b8c0688d58f956a8edbb0d418df6b diff --git a/citadel/textclient/client_chat.c b/citadel/textclient/client_chat.c index dbe0ce900..7bf21af22 100644 --- a/citadel/textclient/client_chat.c +++ b/citadel/textclient/client_chat.c @@ -108,6 +108,13 @@ void chatmode(CtdlIPC *ipc) tv.tv_usec = 0; retval = select(1, &rfds, NULL, NULL, &tv); + if (retval < 0) { + color(BRIGHT_WHITE); + scr_printf("Server gone Exiting chat mode\n"); + scr_flush(); + return; + } + /* If there's data from the keyboard... */ if (FD_ISSET(0, &rfds)) { ch = scr_getc(SCR_BLOCK);