FTP: fix bad check of Curl_timeleft() return code
authorDaniel Stenberg <daniel@haxx.se>
Sat, 18 Sep 2010 21:08:32 +0000 (23:08 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 18 Sep 2010 21:08:32 +0000 (23:08 +0200)
When it returns 0 it means no timeout. Only a negative value means that
we're out of time.

lib/ftp.c

index 40ed4b7..3ea1dd3 100644 (file)
--- 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;