aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 123f8dfcd..a8ef16651 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -282,6 +282,8 @@ int Curl_GetFTPResponse(int sockfd, char *buf,
*/
if(CURLE_OK != Curl_read(conn, sockfd, ptr, 1, &keepon))
keepon = FALSE;
+ else if(keepon < 0)
+ error = SELECT_ERROR;
else if ((*ptr == '\n') || (*ptr == '\r'))
keepon = FALSE;
}