fixed incorrect assert when receiving a 0-size piece message

This commit is contained in:
Arvid Norberg 2008-11-17 19:12:34 +00:00
parent 4fed0cd542
commit 370ee02ef6
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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;
}