diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 606a38930..e0962bf06 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -284,8 +284,8 @@ namespace libtorrent { torrent* t = c.associated_torrent().lock().get(); assert(t); - t->unchoke_peer(c); - ++m_num_unchoked; + if (t->unchoke_peer(c)) + ++m_num_unchoked; } session_status status() const;