#1493 possible bug when using CURLOPT_CLOSESOCKETFUNCTION?

closed-fixed
None
5
2015-03-15
2015-03-10
Frank meier
No

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

1 Attachments

Related

Bugs: #1403

Discussion

  • Daniel Stenberg

    Daniel Stenberg - 2015-03-15

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

     
  • Daniel Stenberg

    Daniel Stenberg - 2015-03-15
    • status: open --> closed-fixed
    • assigned_to: Daniel Stenberg
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks