Skip to content
Snippets Groups Projects
Commit 9e0882ba authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

close the existing socket when trying next IP, as otherwise we leak one!

bug #1326306
parent c890149c
No related branches found
No related tags found
No related merge requests found
......@@ -472,6 +472,9 @@ static bool trynextip(struct connectdata *conn,
if(sockindex != FIRSTSOCKET)
return TRUE; /* no next */
/* first close the failed socket */
sclose(conn->sock[sockindex]);
/* try the next address */
ai = conn->ip_addr->ai_next;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment