remove invalid assert in http_seed_connection
This commit is contained in:
parent
cb0d6a057f
commit
a7e98983d2
|
@ -113,11 +113,10 @@ namespace libtorrent {
|
|||
}
|
||||
else
|
||||
{
|
||||
int receive_buffer_size = int(m_recv_buffer.get().size()) - m_parser.body_start();
|
||||
// TODO: 1 in chunked encoding mode, this assert won't hold.
|
||||
// the chunk headers should be subtracted from the receive_buffer_size
|
||||
TORRENT_ASSERT_VAL(receive_buffer_size <= t->block_size(), receive_buffer_size);
|
||||
ret.bytes_downloaded = t->block_size() - receive_buffer_size;
|
||||
int const receive_buffer_size = int(m_recv_buffer.get().size()) - m_parser.body_start();
|
||||
// this is an approximation. in chunked encoding mode the chunk headers
|
||||
// should really be subtracted from the receive_buffer_size
|
||||
ret.bytes_downloaded = std::max(0, t->block_size() - receive_buffer_size);
|
||||
}
|
||||
// this is used to make sure that the block_index stays within
|
||||
// bounds. If the entire piece is downloaded, the block_index
|
||||
|
|
Loading…
Reference in New Issue