connection_queue::close() fix

This commit is contained in:
Arvid Norberg
2008-11-01 09:02:13 +00:00
parent d721e99026
commit da9a5c4262

View File

@@ -123,10 +123,11 @@ namespace libtorrent
{
// we don't want to call the timeout callback while we're locked
// since that is a recepie for dead-locks
l.unlock();
try { m_queue.front().on_timeout(); } catch (std::exception&) {}
l.lock();
entry e = m_queue.front();
m_queue.pop_front();
l.unlock();
try { e.on_timeout(); } catch (std::exception&) {}
l.lock();
}
}