From f95f5b05c268b31c691e31b46b3f86e55f88f7cc Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 20 Mar 2017 23:58:08 -0400 Subject: [PATCH] fix issue where torrent_status::num_seeds could be negative --- ChangeLog | 1 + src/torrent.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6084d1a4d..14499ed79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/torrent.cpp b/src/torrent.cpp index eca8110d5..ded965319 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -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) =