From: Wilfried Goesgens Date: Sun, 26 Feb 2012 12:58:02 +0000 (+0100) Subject: before reading from the server socket check whether its connected at all. X-Git-Tag: v8.11~163 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=0083b1694e1f3c43c8b98ed1de65640a2935aad2;p=citadel.git before reading from the server socket check whether its connected at all. --- diff --git a/webcit/tcp_sockets.c b/webcit/tcp_sockets.c index 9952fd9ab..30164144e 100644 --- a/webcit/tcp_sockets.c +++ b/webcit/tcp_sockets.c @@ -172,6 +172,9 @@ int StrBuf_ServGetln(StrBuf *buf) const char *ErrStr = NULL; int rc; + if (!WCC->connected) + return -1; + FlushStrBuf(buf); rc = StrBufTCP_read_buffered_line_fast(buf, WCC->ReadBuf,