rate limiter fix for metadata extension
This commit is contained in:
@@ -207,6 +207,8 @@ namespace libtorrent { namespace
|
||||
metadata();
|
||||
}
|
||||
|
||||
int metadata_size() const { return m_metadata_size; }
|
||||
|
||||
private:
|
||||
torrent& m_torrent;
|
||||
|
||||
@@ -285,6 +287,8 @@ namespace libtorrent { namespace
|
||||
<< " ==> METADATA_REQUEST [ start: " << start << " | size: " << size << " ]\n";
|
||||
#endif
|
||||
|
||||
m_pc.extension_expect_bytes(m_tp.metadata_size() == 0 ? 2048 : m_tp.metadata_size() * size / 255);
|
||||
|
||||
buffer::interval i = m_pc.allocate_send_buffer(9);
|
||||
|
||||
detail::write_uint32(1 + 1 + 3, i.begin);
|
||||
|
Reference in New Issue
Block a user