diff options
author | Frank Meier <frank.meier@ergon.ch> | 2015-03-15 13:24:26 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-03-15 13:26:03 +0100 |
commit | 9063a7f853a35d2ca9dfe8ac39f4649720081fb3 (patch) | |
tree | 1f15ba32bd7abc4dc0f607a2760cebc8bed29536 | |
parent | 851c29269bbc5958cc43f2ae4f1c22eb00fa98f6 (diff) |
closesocket: call multi socket cb on close even with custom close
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
-rw-r--r-- | lib/connect.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/connect.c b/lib/connect.c index 464d7fbac..aa4dbe0fe 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -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) |