From 4897a9b038ce60a6479add117fde1e3aee9efed5 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sun, 19 Aug 2007 08:55:33 +0000 Subject: [PATCH] choked fix --- libtorrent/src/session_impl.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index 7a893e8fe..a77b60c9c 100755 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -1089,17 +1089,12 @@ namespace detail { if (p->is_choked()) { - if (t->unchoke_peer(*p)) - { - --unchoke_set_size; - ++m_num_unchoked; - } - } - else - { - --unchoke_set_size; - ++m_num_unchoked; + if (!t->unchoke_peer(*p)) + continue; } + + --unchoke_set_size; + ++m_num_unchoked; assert(p->peer_info_struct()); if (p->peer_info_struct()->optimistically_unchoked)