aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-06-05 13:42:23 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-06-05 13:42:23 +0000
commit48064f8deefd5424591a1caeb4ddf6ae9754679a (patch)
tree46c2a42230ae26f5bc948cd771ffad2ce1461adc
parente71378d3c83c43517e86d2ae792445301fd58aa6 (diff)
if we read zero bytes from the proxy, the connection is broken and we need
to bail out
-rw-r--r--lib/socks.c5
1 files changed, 5 insertions, 0 deletions
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;