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;