diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index f21562552..377cf7d14 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -497,6 +497,9 @@ namespace libtorrent --m_disk_queues[channel]; } + void add_to_update_queue(boost::weak_ptr t) + { m_state_updates.push_back(t); } + // private: void update_connections_limit(); diff --git a/src/torrent.cpp b/src/torrent.cpp index 66b265a97..338de1308 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -8032,7 +8032,7 @@ ctx->set_verify_callback(verify_function, ec); // add it to the list twice if (!m_state_subscription || m_in_state_updates) return; - m_ses.m_state_updates.push_back(shared_from_this()); + m_ses.add_to_update_queue(shared_from_this()); m_in_state_updates = true; }