:attempt to fix disconnections when torrents enter upload mode due to failures

This commit is contained in:
arvidn 2017-12-19 19:39:03 +02:00 committed by Arvid Norberg
parent 0aef2c2846
commit 67be35739c
1 changed files with 2 additions and 0 deletions

View File

@ -751,6 +751,7 @@ namespace libtorrent
#endif #endif
if (t->is_upload_only()) send_not_interested(); if (t->is_upload_only()) send_not_interested();
else t->peer_is_interesting(*this); else t->peer_is_interesting(*this);
disconnect_if_redundant();
return; return;
} }
@ -1931,6 +1932,7 @@ namespace libtorrent
if (t && t->has_picker()) if (t && t->has_picker())
t->picker().check_peer_invariant(m_have_piece, peer_info_struct()); t->picker().check_peer_invariant(m_have_piece, peer_info_struct());
#endif #endif
if (disconnect_if_redundant()) return;
} }
// it's important to update whether we're intersted in this peer before // it's important to update whether we're intersted in this peer before