forked from premiere/premiere-libtorrent
fixed race conditon when receiving metadata from swarm
This commit is contained in:
parent
c9392fe0fb
commit
b97dcc8c58
|
@ -96,6 +96,7 @@ release 0.14.7
|
|||
ended with a /
|
||||
* fixed bug in error handling when parsing torrent files
|
||||
* fixed file checking bug when renaming a file before checking the torrent
|
||||
* fixed race conditon when receiving metadata from swarm
|
||||
|
||||
release 0.14.6
|
||||
|
||||
|
|
|
@ -131,6 +131,10 @@ namespace libtorrent
|
|||
// don't request pieces before we have the metadata
|
||||
if (!t.valid_metadata()) return;
|
||||
|
||||
// don't request pieces before the peer is properly
|
||||
// initialized after we have the metadata
|
||||
if (!t.are_files_checked()) return;
|
||||
|
||||
TORRENT_ASSERT(t.valid_metadata());
|
||||
TORRENT_ASSERT(c.peer_info_struct() != 0 || !dynamic_cast<bt_peer_connection*>(&c));
|
||||
int num_requests = c.desired_queue_size()
|
||||
|
|
Loading…
Reference in New Issue