From 0083b1694e1f3c43c8b98ed1de65640a2935aad2 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sun, 26 Feb 2012 13:58:02 +0100 Subject: [PATCH] before reading from the server socket check whether its connected at all. --- webcit/tcp_sockets.c | 3 +++ 1 file changed, 3 insertions(+) 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, -- 2.30.2