fixed incorrect assert when receiving a 0-size piece message
This commit is contained in:
parent
4fed0cd542
commit
370ee02ef6
|
@ -1013,7 +1013,7 @@ namespace libtorrent
|
|||
return;
|
||||
}
|
||||
}
|
||||
TORRENT_ASSERT(has_disk_receive_buffer());
|
||||
TORRENT_ASSERT(has_disk_receive_buffer()) || packet_size() == 9;
|
||||
|
||||
// classify the received data as protocol chatter
|
||||
// or data payload for the statistics
|
||||
|
|
|
@ -1650,7 +1650,7 @@ namespace libtorrent
|
|||
if (t->alerts().should_post<peer_error_alert>())
|
||||
{
|
||||
t->alerts().post_alert(peer_error_alert(t->get_handle(), m_remote
|
||||
, m_peer_id, "peer sent 0 length piece"));
|
||||
, m_peer_id, "peer sent 0 length piece"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue