diff --git a/ChangeLog b/ChangeLog index eeaa76991..b9370be6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 1.1.1 release + * fixed peer-class leak when settings per-torrent rate limits * added a new "preformatted" type to bencode entry variant type * improved Socks5 support and test coverage * fix set_settings in python binding diff --git a/simulation/libsimulator b/simulation/libsimulator index ea3bffe3c..ad23c932e 160000 --- a/simulation/libsimulator +++ b/simulation/libsimulator @@ -1 +1 @@ -Subproject commit ea3bffe3c53bca5e0976914ea951193ba43fbed6 +Subproject commit ad23c932ecd852f89c7d8b29dfe162e9ee073a1b diff --git a/src/torrent.cpp b/src/torrent.cpp index 359b58368..911b0a828 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -970,6 +970,7 @@ namespace libtorrent // this means that the invariant check that this is called from the // network thread cannot be maintained + TORRENT_ASSERT(m_peer_class == 0); TORRENT_ASSERT(m_abort); TORRENT_ASSERT(m_connections.empty()); if (!m_connections.empty()) @@ -4936,6 +4937,12 @@ namespace libtorrent update_gauge(); stop_announcing(); + if (m_peer_class > 0) + { + m_ses.peer_classes().decref(m_peer_class); + m_peer_class = 0; + } + error_code ec; m_inactivity_timer.cancel(ec);