fixed race condition when a torrent is removed while one of the connections is still in the connection queue
This commit is contained in:
parent
291ef2a2c9
commit
62daedeae0
|
@ -2334,7 +2334,13 @@ namespace libtorrent
|
|||
ptime now(time_now());
|
||||
|
||||
boost::shared_ptr<torrent> t = m_torrent.lock();
|
||||
TORRENT_ASSERT(t);
|
||||
if (!t || m_disconnecting)
|
||||
{
|
||||
m_ses.m_half_open.done(m_connection_ticket);
|
||||
m_connecting = false;
|
||||
disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
on_tick();
|
||||
|
||||
|
|
Loading…
Reference in New Issue