better exception handling and more invariant checks

This commit is contained in:
Arvid Norberg
2008-01-19 19:00:54 +00:00
parent 365b8c07c6
commit 8b455be1d9
3 changed files with 29 additions and 14 deletions

View File

@@ -2475,6 +2475,7 @@ namespace detail
boost::shared_ptr<torrent> t = (*i)->associated_torrent().lock();
peer_connection* p = i->get();
TORRENT_ASSERT(!p->is_disconnecting());
if (!p->is_choked()) ++unchokes;
if (p->peer_info_struct()
&& p->peer_info_struct()->optimistically_unchoked)