forked from premiere/premiere-libtorrent
ut_pex exception fix
This commit is contained in:
parent
507b812ae8
commit
6fa3d37e83
|
@ -215,7 +215,10 @@ namespace libtorrent { namespace
|
||||||
if (m_message_index == 0) return false;
|
if (m_message_index == 0) return false;
|
||||||
|
|
||||||
if (length > 500 * 1024)
|
if (length > 500 * 1024)
|
||||||
throw protocol_error("uT peer exchange message larger than 500 kB");
|
{
|
||||||
|
m_pc.disconnect("peer exchange message larger than 500 kB");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (body.left() < length) return true;
|
if (body.left() < length) return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue