From: Daniel Stenberg Date: Sat, 18 Sep 2010 21:08:32 +0000 (+0200) Subject: FTP: fix bad check of Curl_timeleft() return code X-Git-Tag: curl-7_21_2~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a00c94b0f7a5d7c200817a5261cbff72a405bfc;p=thirdparty%2Fcurl.git FTP: fix bad check of Curl_timeleft() return code When it returns 0 it means no timeout. Only a negative value means that we're out of time. --- diff --git a/lib/ftp.c b/lib/ftp.c index 40ed4b7903..3ea1dd31d9 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -324,7 +324,7 @@ static CURLcode AllowServerConnect(struct connectdata *conn) for(;;) { timeout_ms = Curl_timeleft(conn, NULL, TRUE); - if(timeout_ms <= 0) { + if(timeout_ms < 0) { /* if a timeout was already reached, bail out */ failf(data, "Timeout while waiting for server connect"); return CURLE_OPERATION_TIMEDOUT;