fix issue where torrent_status::num_seeds could be negative

This commit is contained in:
arvidn 2017-03-20 23:58:08 -04:00
parent ddf2c2e1ca
commit f95f5b05c2
2 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
* fix issue where torrent_status::num_seeds could be negative
* document deprecation of dynamic loading/unloading of torrents
* include user-agent in tracker announces in anonymous_mode for private torrents
* add support for IPv6 peers from udp trackers

View File

@ -12235,7 +12235,7 @@ namespace libtorrent
st->pieces.resize(num_pieces, false);
}
st->num_pieces = num_have();
st->num_seeds = num_seeds() - int(m_num_connecting_seeds);
st->num_seeds = num_seeds();
if ((flags & torrent_handle::query_distributed_copies) && m_picker.get())
{
boost::tie(st->distributed_full_copies, st->distributed_fraction) =