Commit 8a00c94b authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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.
parent 9de4b266
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;