cURL cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1493 possible bug when using CURLOPT_CLOSESOCKETFUNCTION?

From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Sun, 15 Mar 2015 12:27:59 +0000

- **status**: open --> closed-fixed
- **assigned_to**: Daniel Stenberg
- **Comment**:

Thanks a lot Frank, I agree with your analysis so I merged your patch and pushed it just now as commit 9063a7f853. Case closed.

---
** [bugs:#1493] possible bug when using CURLOPT_CLOSESOCKETFUNCTION?**
**Status:** closed-fixed
**Created:** Tue Mar 10, 2015 04:36 PM UTC by Frank meier
**Last Updated:** Tue Mar 10, 2015 04:36 PM UTC
**Owner:** Daniel Stenberg
Hi
I already asked about this on the mailing list, but I didn't get an answer, that's why I open a ticket now.
I stumbled over some libcurl code, that seems strange to me: in function Curl_closesocket() in connect.c the call to Curl_multi_closed() is omitted if a socket close function (CURLOPT_CLOSESOCKETFUNCTION) is registered.
My understanding is that the behavior with and without a registered close function (that only calls close(sock)) should be the same.
I haven't tested anything, it just caught my eye. So could this be a problem?
I would propose something like the attached patch
cheers, Frank 
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2015-03-15

These mail archives are generated by hypermail.