forked from premiere/premiere-libtorrent
fix invariant-check bug in peer_connection
This commit is contained in:
parent
d396ab7b17
commit
0e1d2ede70
|
@ -2510,11 +2510,13 @@ namespace libtorrent
|
|||
|
||||
void peer_connection::second_tick(float tick_interval)
|
||||
{
|
||||
INVARIANT_CHECK;
|
||||
|
||||
ptime now(time_now());
|
||||
boost::intrusive_ptr<peer_connection> me(self());
|
||||
|
||||
// the invariant check must be run before me is destructed
|
||||
// in case the peer got disconnected
|
||||
INVARIANT_CHECK;
|
||||
|
||||
boost::shared_ptr<torrent> t = m_torrent.lock();
|
||||
if (!t || m_disconnecting)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue