diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-01-14 23:14:59 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-01-14 23:14:59 +0000 |
commit | 4931fbce49887f7d4022c39ea7d94c4294b5f479 (patch) | |
tree | de5a20a6d1624ad07fe7509e10900773160d711b /lib/http.c | |
parent | fefc7ea6008c48cbc3c346da4da55169da8c3adc (diff) |
Curl_read() now returns a negative return code if EWOULDBLOCK or similar
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/http.c b/lib/http.c index ffb442089..795a6f79c 100644 --- a/lib/http.c +++ b/lib/http.c @@ -235,6 +235,7 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn, int subversion=0; struct SessionHandle *data=conn->data; CURLcode result; + int res; int nread; /* total size read */ int perline; /* count bytes per line */ @@ -317,8 +318,12 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn, * to read, but when we use Curl_read() it may do so. Do confirm * that this is still ok and then remove this comment! */ - if(CURLE_OK != Curl_read(conn, tunnelsocket, ptr, BUFSIZE-nread, - &gotbytes)) + res= Curl_read(conn, tunnelsocket, ptr, BUFSIZE-nread, + &gotbytes); + if(res< 0) + /* EWOULDBLOCK */ + continue; /* go loop yourself */ + else if(res) keepon = FALSE; else if(gotbytes <= 0) { keepon = FALSE; |