fix crash when tracker connections fails in the constructor (used to be the case for scrape when there were no url transform from announce to scrape)

This commit is contained in:
Arvid Norberg
2008-09-07 10:03:59 +00:00
parent a61c1ee01d
commit 3077fdcb6a
6 changed files with 44 additions and 24 deletions

View File

@@ -75,6 +75,7 @@ namespace libtorrent
, proxy_settings const& ps
, std::string const& password = "");
void start();
void close();
private:
@@ -92,6 +93,11 @@ namespace libtorrent
tracker_manager& m_man;
boost::shared_ptr<http_connection> m_tracker_connection;
session_settings const& m_settings;
address m_bind_iface;
proxy_settings const& m_ps;
connection_queue& m_cc;
io_service& m_ios;
};
}

View File

@@ -194,6 +194,7 @@ namespace libtorrent
void fail(int code, char const* msg);
void fail_timeout();
virtual void start() = 0;
virtual void close();
address const& bind_interface() const { return m_bind_interface; }

View File

@@ -74,6 +74,7 @@ namespace libtorrent
, session_settings const& stn
, proxy_settings const& ps);
void start();
void close();
private: