On Tue, 14 Jan 2014, svante karlsson wrote:
Yep, that was it. Since I'm using asio I moved the cleanup calls (A + B) to a separate function and called this using _io_service.post(boost::bind(&http_client_async_handler::_poll_remove, this, context)); which means that it will be called after the current callback has ended.
Just don't remove/close any handle because a file descriptor is removed. A handle can use no, one or more file descriptors (and it can certainly change them through its life time) and you should keep the file descriptor "attached" to the multi handle until it reports as completed - at least if you want to perform the complete transfer.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
