diff --git a/include/libtorrent/bandwidth_manager.hpp b/include/libtorrent/bandwidth_manager.hpp index 9dbfdfcdc..535f29608 100644 --- a/include/libtorrent/bandwidth_manager.hpp +++ b/include/libtorrent/bandwidth_manager.hpp @@ -150,6 +150,7 @@ struct bandwidth_manager void close() { + mutex_t::scoped_lock l(m_mutex); m_abort = true; m_queue.clear(); m_queued_bytes = 0;