forked from premiere/premiere-libtorrent
fix optimistic unchoke stats gauge
This commit is contained in:
parent
d7d498c3a3
commit
a6eda97281
|
@ -1150,7 +1150,8 @@ namespace libtorrent
|
|||
}
|
||||
|
||||
// this is called whenever a peer connection is closed
|
||||
void policy::connection_closed(const peer_connection_interface& c, int session_time, torrent_state* state)
|
||||
void policy::connection_closed(const peer_connection_interface& c
|
||||
, int session_time, torrent_state* state)
|
||||
{
|
||||
TORRENT_ASSERT(is_single_thread());
|
||||
INVARIANT_CHECK;
|
||||
|
|
|
@ -5782,7 +5782,12 @@ namespace libtorrent
|
|||
if (pp)
|
||||
{
|
||||
if (pp->optimistically_unchoked)
|
||||
{
|
||||
pp->optimistically_unchoked = false;
|
||||
m_stats_counters.inc_stats_counter(
|
||||
counters::num_peers_up_unchoked_optimistic, -1);
|
||||
trigger_optimistic_unchoke();
|
||||
}
|
||||
|
||||
TORRENT_ASSERT(pp->prev_amount_upload == 0);
|
||||
TORRENT_ASSERT(pp->prev_amount_download == 0);
|
||||
|
|
Loading…
Reference in New Issue