From 8a00c94b0f7a5d7c200817a5261cbff72a405bfc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 18 Sep 2010 23:08:32 +0200 Subject: 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. --- lib/ftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ftp.c') diff --git a/lib/ftp.c b/lib/ftp.c index 40ed4b790..3ea1dd31d 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; -- cgit v1.2.3