Navigation Menu

Skip to content

Commit

Permalink
create_conn: mark conn as in use before added to conncache
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Dec 2, 2017
1 parent d09f147 commit 3dee4fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/url.c
Expand Up @@ -4526,6 +4526,9 @@ static CURLcode create_conn(struct Curl_easy *data,
goto out;
}
else {
/* Mark the connection as used, before we add it */
conn->inuse = TRUE;

/*
* This is a brand new connection, so let's store it in the connection
* cache of ours!
Expand Down Expand Up @@ -4553,9 +4556,6 @@ static CURLcode create_conn(struct Curl_easy *data,
#endif
}

/* Mark the connection as used */
conn->inuse = TRUE;

/* Setup and init stuff before DO starts, in preparing for the transfer. */
Curl_init_do(data, conn);

Expand Down

0 comments on commit 3dee4fc

Please sign in to comment.