forked from premiere/premiere-libtorrent
fixed possible race condition in debug mode
This commit is contained in:
parent
4cab49cbdf
commit
f85873263b
|
@ -2397,6 +2397,8 @@ namespace libtorrent
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
void torrent::check_invariant() const
|
void torrent::check_invariant() const
|
||||||
{
|
{
|
||||||
|
session_impl::mutex_t::scoped_lock l(m_ses.m_mutex);
|
||||||
|
|
||||||
int num_uploads = 0;
|
int num_uploads = 0;
|
||||||
std::map<piece_block, int> num_requests;
|
std::map<piece_block, int> num_requests;
|
||||||
for (const_peer_iterator i = begin(); i != end(); ++i)
|
for (const_peer_iterator i = begin(); i != end(); ++i)
|
||||||
|
|
Loading…
Reference in New Issue