forked from premiere/premiere-libtorrent
a bit more conservative block request timeouts. promote some invariant checks in the DHT as expensive (to disable them for regular debug builds)
This commit is contained in:
parent
1ce3bdf0d0
commit
333a13c957
|
@ -490,7 +490,9 @@ bool routing_table::add_node(node_entry e)
|
|||
|
||||
routing_table::add_node_status_t routing_table::add_node_impl(node_entry e)
|
||||
{
|
||||
#ifdef TORRENT_EXPENSIVE_INVARIANT_CHECKS
|
||||
INVARIANT_CHECK;
|
||||
#endif
|
||||
|
||||
// if we already have this (IP,port), don't do anything
|
||||
if (m_router_nodes.find(e.ep()) != m_router_nodes.end())
|
||||
|
@ -940,7 +942,9 @@ void routing_table::for_each_node(
|
|||
|
||||
void routing_table::node_failed(node_id const& nid, udp::endpoint const& ep)
|
||||
{
|
||||
#ifdef TORRENT_EXPENSIVE_INVARIANT_CHECKS
|
||||
INVARIANT_CHECK;
|
||||
#endif
|
||||
|
||||
// if messages to ourself fails, ignore it
|
||||
if (nid == m_id) return;
|
||||
|
|
|
@ -4193,7 +4193,7 @@ namespace libtorrent
|
|||
}
|
||||
else
|
||||
{
|
||||
ret = avg + deviation * 3;
|
||||
ret = avg + deviation * 4;
|
||||
}
|
||||
|
||||
// ret is milliseconds, the return value is seconds. Convert to
|
||||
|
|
Loading…
Reference in New Issue