fixed choke bug

This commit is contained in:
Arvid Norberg 2007-08-22 18:50:53 +00:00
parent f7737cae32
commit a5e985ec7c
1 changed files with 9 additions and 0 deletions

View File

@ -1068,7 +1068,16 @@ namespace detail
&& !t->is_seed()))
{
if (!i->second->is_choked() && t)
{
policy::peer* pi = p->peer_info_struct();
if (pi && pi->optimistically_unchoked)
{
pi->optimistically_unchoked = false;
// force a new optimistic unchoke
m_optimistic_unchoke_time_scaler = 0;
}
t->choke_peer(*i->second);
}
continue;
}
peers.push_back(i->second.get());