fixed deadlock in http_tracker_connection

This commit is contained in:
Arvid Norberg 2009-06-09 05:51:10 +00:00
parent 18bc7c3fc7
commit 33768fa282
2 changed files with 3 additions and 2 deletions

View File

@ -196,6 +196,7 @@ namespace libtorrent
tracker_request const& tracker_req() const { return m_req; }
void fail_disp(int code, std::string const& msg) { fail(code, msg.c_str()); }
void fail(int code, char const* msg);
void fail_timeout();
virtual void start() = 0;

View File

@ -95,8 +95,8 @@ namespace libtorrent
std::size_t pos = url.find("announce");
if (pos == std::string::npos)
{
fail(-1, ("scrape is not available on url: '"
+ tracker_req().url +"'").c_str());
m_ios.post(boost::bind(&http_tracker_connection::fail_disp, self()
, -1, "scrape is not available on url: '" + tracker_req().url +"'"));
return;
}
url.replace(pos, 8, "scrape");