diff options
Diffstat (limited to 'libtorrent/include/libtorrent/bandwidth_manager.hpp')
-rw-r--r-- | libtorrent/include/libtorrent/bandwidth_manager.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libtorrent/include/libtorrent/bandwidth_manager.hpp b/libtorrent/include/libtorrent/bandwidth_manager.hpp index c3b4f5942..19f0cc790 100644 --- a/libtorrent/include/libtorrent/bandwidth_manager.hpp +++ b/libtorrent/include/libtorrent/bandwidth_manager.hpp @@ -117,6 +117,9 @@ struct bandwidth_manager void close() { m_abort = true; + m_queue.clear(); + m_history.clear(); + m_current_quota = 0; m_history_timer.cancel(); } @@ -153,6 +156,7 @@ struct bandwidth_manager { mutex_t::scoped_lock l(m_mutex); INVARIANT_CHECK; + if (m_abort) return; TORRENT_ASSERT(blk > 0); TORRENT_ASSERT(!peer->ignore_bandwidth_limits()); |