Commit e36fb1ec authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Curl_wait_for_resolv() no longer disconnects on failure, but leaves that

operation to the caller. Disconnecting has the disadvantage that the conn
pointer gets completely invalidated and this is not handled on lots of places
in the code.
parent e4a17886
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ CURLcode Curl_wait_for_resolv(struct connectdata *conn,

    /* close the connection, since we can't return failure here without
       cleaning up this connection properly */
    Curl_disconnect(conn);
    conn->bits.close = TRUE;
  }

  return rc;
+2 −0
Original line number Diff line number Diff line
@@ -2038,6 +2038,8 @@ Curl_connect_host(struct SessionHandle *data,
      if(CURLE_OK == res)
        /* Resolved, continue with the connection */
        res = Curl_async_resolved(*conn);
      else
        (void)Curl_disconnect(*conn);
    }
    if(res)
      break;