1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-12 04:25:08 -05:00

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.
This commit is contained in:
Daniel Stenberg 2010-09-18 23:08:32 +02:00
parent 9de4b26643
commit 8a00c94b0f

View File

@ -324,7 +324,7 @@ static CURLcode AllowServerConnect(struct connectdata *conn)
for(;;) { for(;;) {
timeout_ms = Curl_timeleft(conn, NULL, TRUE); timeout_ms = Curl_timeleft(conn, NULL, TRUE);
if(timeout_ms <= 0) { if(timeout_ms < 0) {
/* if a timeout was already reached, bail out */ /* if a timeout was already reached, bail out */
failf(data, "Timeout while waiting for server connect"); failf(data, "Timeout while waiting for server connect");
return CURLE_OPERATION_TIMEDOUT; return CURLE_OPERATION_TIMEDOUT;