From 48064f8deefd5424591a1caeb4ddf6ae9754679a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 5 Jun 2007 13:42:23 +0000 Subject: if we read zero bytes from the proxy, the connection is broken and we need to bail out --- lib/socks.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/socks.c b/lib/socks.c index 6b95e752d..e1ad86cc0 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -98,6 +98,11 @@ static int blockread_all(struct connectdata *conn, /* connection data */ result = CURLE_OK; break; } + if(!nread) { + result = ~CURLE_OK; + break; + } + buffersize -= nread; buf += nread; allread += nread; -- cgit v1.2.3