forked from premiere/premiere-libtorrent
fixed bug where pieces may have been requested before the metadata was received
This commit is contained in:
parent
115a4b1863
commit
cdc30f1dd1
|
@ -83,6 +83,8 @@ release 0.14.7
|
|||
* improved forward compatibility in DHT
|
||||
* added set_piece_hashes that takes a callback to the python binding
|
||||
* fixed division by zero in get_peer_info()
|
||||
* fixed bug where pieces may have been requested before the metadata
|
||||
was received
|
||||
|
||||
release 0.14.6
|
||||
|
||||
|
|
|
@ -128,6 +128,9 @@ namespace libtorrent
|
|||
if (c.no_download()) return;
|
||||
if (t.upload_mode()) return;
|
||||
|
||||
// don't request pieces before we have the metadata
|
||||
if (!t.valid_metadata()) 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