diff options
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) ; |