Skip to content

Commit

Permalink
closesocket: call multi socket cb on close even with custom close
Browse files Browse the repository at this point in the history
In function Curl_closesocket() in connect.c the call to
Curl_multi_closed() was wrongly omitted if a socket close function
(CURLOPT_CLOSESOCKETFUNCTION) is registered.

That would lead to not removing the socket from the internal hash table
and not calling the multi socket callback appropriately.

Bug: http://curl.haxx.se/bug/view.cgi?id=1493
  • Loading branch information
meierfra-ergon authored and bagder committed Mar 15, 2015
1 parent 851c292 commit 9063a7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/connect.c
Expand Up @@ -1263,8 +1263,10 @@ int Curl_closesocket(struct connectdata *conn,
accept, then we MUST NOT call the callback but clear the accepted
status */
conn->sock_accepted[SECONDARYSOCKET] = FALSE;
else
else {
Curl_multi_closed(conn, sock);
return conn->fclosesocket(conn->closesocket_client, sock);
}
}

if(conn)
Expand Down

0 comments on commit 9063a7f

Please sign in to comment.