forked from premiere/premiere-libtorrent
fixed incorrect locking that might cause invariant check failures
This commit is contained in:
parent
c9fac1efa0
commit
f65b5f677b
|
@ -543,6 +543,8 @@ namespace libtorrent
|
|||
|
||||
void torrent::tracker_warning(std::string const& msg)
|
||||
{
|
||||
session_impl::mutex_t::scoped_lock l(m_ses.m_mutex);
|
||||
|
||||
INVARIANT_CHECK;
|
||||
|
||||
if (m_ses.m_alerts.should_post(alert::warning))
|
||||
|
@ -558,10 +560,10 @@ namespace libtorrent
|
|||
, int complete
|
||||
, int incomplete)
|
||||
{
|
||||
INVARIANT_CHECK;
|
||||
|
||||
session_impl::mutex_t::scoped_lock l(m_ses.m_mutex);
|
||||
|
||||
INVARIANT_CHECK;
|
||||
|
||||
m_failed_trackers = 0;
|
||||
// announce intervals less than 5 minutes
|
||||
// are insane.
|
||||
|
@ -2816,6 +2818,7 @@ namespace libtorrent
|
|||
tracker_request const&)
|
||||
{
|
||||
session_impl::mutex_t::scoped_lock l(m_ses.m_mutex);
|
||||
|
||||
INVARIANT_CHECK;
|
||||
|
||||
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
|
||||
|
@ -2840,9 +2843,10 @@ namespace libtorrent
|
|||
void torrent::tracker_request_error(tracker_request const&
|
||||
, int response_code, const std::string& str)
|
||||
{
|
||||
session_impl::mutex_t::scoped_lock l(m_ses.m_mutex);
|
||||
|
||||
INVARIANT_CHECK;
|
||||
|
||||
session_impl::mutex_t::scoped_lock l(m_ses.m_mutex);
|
||||
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
|
||||
debug_log(std::string("*** tracker error: ") + str);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue