http_tracker_connection fix to use separate timeout when stopping a tracker

This commit is contained in:
Arvid Norberg 2008-03-30 19:00:37 +00:00
parent a9bb9023fb
commit 3c15535d35
2 changed files with 10 additions and 1 deletions

View File

@ -167,7 +167,11 @@ namespace libtorrent
m_tracker_connection.reset(new http_connection(ios, cc
, boost::bind(&http_tracker_connection::on_response, self(), _1, _2, _3, _4)));
m_tracker_connection->get(url, seconds(stn.tracker_completion_timeout)
int timeout = req.event==tracker_request::stopped
?stn.stop_tracker_timeout
:stn.tracker_completion_timeout;
m_tracker_connection->get(url, seconds(timeout)
, 1, &ps, 5, stn.user_agent, bind_infc);
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)

View File

@ -335,6 +335,11 @@ exit:
}
// close will remove the entry from m_connections
// so no need to pop
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
boost::shared_ptr<request_callback> rc = c->requester();
if (rc) rc->debug_log("aborting: " + req.url);
#endif
c->close();
}