aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-09-18 23:08:32 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-09-18 23:08:32 +0200
commit8a00c94b0f7a5d7c200817a5261cbff72a405bfc (patch)
treeade1233f8843d7e67b0844df7c74a1dc410c07a4
parent9de4b2664312f0e956305a3f6180f6c6eee10e06 (diff)
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.
-rw-r--r--lib/ftp.c2
1 files changed, 1 insertions, 1 deletions
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;