- /* keep on watching.
- * the socket may have been closed and/or fdp may have been changed
- * in curl_multi_socket_action(), so check them both */
- if(!error && socket_map.find(s) != socket_map.end() &&
- (*fdp == action || *fdp == CURL_POLL_INOUT)) {
- if(action == CURL_POLL_IN) {
- tcp_socket->async_read_some(boost::asio::null_buffers(),
- boost::bind(&event_cb, g, tcp_socket,
- action, _1, fdp));
- }
- if(action == CURL_POLL_OUT) {
- tcp_socket->async_write_some(boost::asio::null_buffers(),
- boost::bind(&event_cb, g, tcp_socket,
- action, _1, fdp));
- }
- }
+ if(g->still_running <= 0)
+ {
+ fprintf(MSG_OUT, "\nlast transfer done, kill timeout");
+ timer.cancel();