X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Ftextclient%2Fclient_chat.c;h=7bf21af225e3e7ba7e618626c17bfeefa2323686;hb=686a8267f3ad753143303673e21dfed5cb314447;hp=dbe0ce900f40503e7232f89e973177648247fec0;hpb=c099b0a256e8913d46be62cb3d8eac03a562ca18;p=citadel.git 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);