curl-library
Re: not receiving CURLMSG_DONE or other end-of-transfer signals
Date: Fri, 24 Apr 2015 11:31:07 -0600
I figured out the root cause of the misbehavior I was observing.
In short, neither curl nor asio has a bug, but the sample integration code
that I worked from did. Perhaps I would have been better off following
mm.w's original suggestion to start from scratch; the sample sent me down a
pretty deep rat hole. Until I post a patch for the sample, I recommend that
we put a disclaimer on asiohiper.cpp. Where it calls
curl_multi_socket_action() in event_cb(), that call needs to be followed by
something like tcp_socket->async_read_some() to be correct. Without this
extra line, the code will hang if the initial read of a response doesn't
complete the transfer. The whole edge-triggered vs. level-triggered issue
was a red herring, although it was a theory that matched my symptoms pretty
well for a while. Modifying looping behavior or polling configuration does
eliminate the problem, but the right fix is something simpler.
Thanks for your patience and suggestions.
--Daniel
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-04-24