fix connection asserts

This commit is contained in:
Arvid Norberg 2012-01-25 07:58:39 +00:00
parent 818620a5a8
commit 6e9ef9edab
1 changed files with 2 additions and 4 deletions

View File

@ -3396,7 +3396,6 @@ namespace libtorrent
void peer_connection::connect_failed(error_code const& e)
{
TORRENT_ASSERT(m_connecting);
TORRENT_ASSERT(e);
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_ERROR_LOGGING
@ -3410,10 +3409,9 @@ namespace libtorrent
++m_ses.m_connect_timeouts;
#endif
TORRENT_ASSERT(m_connecting);
boost::shared_ptr<torrent> t = m_torrent.lock();
if (m_connecting)
TORRENT_ASSERT(!m_connecting || t);
if (m_connecting && t)
{
t->dec_num_connecting();
m_connecting = false;