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/ftp.c | |
parent | fefc7ea6008c48cbc3c346da4da55169da8c3adc (diff) |
Curl_read() now returns a negative return code if EWOULDBLOCK or similar
Diffstat (limited to 'lib/ftp.c')
-rw-r--r-- | lib/ftp.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -267,9 +267,16 @@ int Curl_GetFTPResponse(char *buf, ftp->cache = NULL; /* clear the pointer */ ftp->cache_size = 0; /* zero the size just in case */ } - else if(CURLE_OK != Curl_read(conn, sockfd, ptr, - BUFSIZE-nread, &gotbytes)) - keepon = FALSE; + else { + int res = Curl_read(conn, sockfd, ptr, + BUFSIZE-nread, &gotbytes); + if(res < 0) + /* EWOULDBLOCK */ + continue; /* go looping again */ + + if(CURLE_OK != res) + keepon = FALSE; + } if(!keepon) ; |