updated asserts
This commit is contained in:
parent
b20270d243
commit
3c69e3b2cb
|
@ -1411,7 +1411,8 @@ namespace libtorrent
|
|||
++total_connections;
|
||||
if (!p.connection) continue;
|
||||
if (!m_torrent->settings().allow_multiple_connections_per_ip)
|
||||
assert(p.connection == m_torrent->connection_for(p.ip.address()));
|
||||
assert(p.connection == m_torrent->connection_for(p.ip.address())
|
||||
|| p.connection == m_torrent->connection_for(p.ip));
|
||||
assert(p.connection->peer_info_struct() == 0
|
||||
|| p.connection->peer_info_struct() == &p);
|
||||
++nonempty_connections;
|
||||
|
|
|
@ -938,7 +938,8 @@ namespace libtorrent
|
|||
if (p == 0) continue;
|
||||
#ifndef NDEBUG
|
||||
if (!settings().allow_multiple_connections_per_ip)
|
||||
assert(p->connection == 0 || p->connection == connection_for(p->ip.address()));
|
||||
assert(p->connection == 0 || p->connection == connection_for(p->ip.address())
|
||||
|| p->connection == connection_for(p->ip));
|
||||
#endif
|
||||
if (p->connection) p->connection->received_invalid_data(index);
|
||||
|
||||
|
|
Loading…
Reference in New Issue