forked from premiere/premiere-libtorrent
fix invalid assert in policy and fix minor cleanup issue
This commit is contained in:
parent
816e56cc01
commit
333458f59d
|
@ -937,8 +937,6 @@ namespace libtorrent
|
|||
(peer*)m_torrent->session().m_ipv4_peer_pool.malloc();
|
||||
if (p == 0) return false;
|
||||
|
||||
TORRENT_ASSERT(p->in_use == false);
|
||||
|
||||
#if TORRENT_USE_IPV6
|
||||
if (is_v6)
|
||||
m_torrent->session().m_ipv6_peer_pool.set_next_size(500);
|
||||
|
@ -1251,7 +1249,7 @@ namespace libtorrent
|
|||
p->in_use = false;
|
||||
#endif
|
||||
|
||||
m_torrent->session().m_i2p_peer_pool.free((i2p_peer*)p);
|
||||
m_torrent->session().m_i2p_peer_pool.destroy((i2p_peer*)p);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -1376,10 +1374,10 @@ namespace libtorrent
|
|||
p->in_use = false;
|
||||
#endif
|
||||
#if TORRENT_USE_IPV6
|
||||
if (is_v6) m_torrent->session().m_ipv6_peer_pool.free((ipv6_peer*)p);
|
||||
if (is_v6) m_torrent->session().m_ipv6_peer_pool.destroy((ipv6_peer*)p);
|
||||
else
|
||||
#endif
|
||||
m_torrent->session().m_ipv4_peer_pool.free((ipv4_peer*)p);
|
||||
m_torrent->session().m_ipv4_peer_pool.destroy((ipv4_peer*)p);
|
||||
return 0;
|
||||
}
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
|
|
Loading…
Reference in New Issue