fixed race condition when calling a function that re-evaluates the interested flags on peers (such as prioritize files) right after the metadata is received, but before the connections are initialized
This commit is contained in:
parent
f14e76a3f9
commit
e7df553fdd
|
@ -337,6 +337,11 @@ namespace libtorrent
|
|||
boost::shared_ptr<torrent> t = m_torrent.lock();
|
||||
TORRENT_ASSERT(t);
|
||||
|
||||
// if m_have_piece is 0, it means the connections
|
||||
// have not been initialized yet. The interested
|
||||
// flag will be updated once they are.
|
||||
if (m_have_piece.size() == 0) return;
|
||||
|
||||
bool interested = false;
|
||||
if (!t->is_finished())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue