|
|
cURL Mailing List Monthly Index Single Mail
curl-tracker mailing list Archives
[ curl-Bugs-3017819 ] trynextip() doesn't work with multi_socket_action and kqueue
From: SourceForge.net <noreply_at_sourceforge.net>
Date: Thu, 24 Jun 2010 21:23:32 +0000
Bugs item #3017819, was opened at 2010-06-18 01:15
Please note that this message will contain a full copy of the comment thread,
Initial Comment:
The correct fix is to ensure that socket_cb is called to remove the fd when trynextip() closes the socket, and again to re-add it after singleipsocket(). I'm not sure how to cleanly do that, but the attached patch works around the problem in an admittedly kludgy way by delaying the close to ensure that the newly-opened socket gets a different fd.
I have verified that the problem exists in libcurl 7.20.0 and 7.21.0 on Mac OS 10.6. I cannot reproduce the problem in libcurl 7.19.7, although the difference appears to be because that version tries the available IP addresses in a different order than the later releases, so the underlying problem is likely still present.
The problem does not occur when using select()/poll(), as those functions are not stateful and there is no magic causing the socket to be automatically forgotten when it is closed. I have not been able to reproduce the problem with epoll on linux, but my reading of the docs suggests that it may be a problem there as well.
----------------------------------------------------------------------
>Comment By: Daniel Stenberg (bagder)
Message:
Case closed!
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Message:
If you also provide me with an email address of yours, I will give you
Thanks a lot for your help to improve libcurl!
----------------------------------------------------------------------
You can respond by visiting:
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info