diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index cc54adf3e..03d7b7df3 100755 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -2334,7 +2334,13 @@ namespace libtorrent ptime now(time_now()); boost::shared_ptr 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();