removed too expensive invariant checks
This commit is contained in:
parent
847f96d9c3
commit
e074b0a977
|
@ -1370,7 +1370,8 @@ namespace libtorrent
|
|||
#ifndef NDEBUG
|
||||
bool policy::has_connection(const peer_connection* c)
|
||||
{
|
||||
INVARIANT_CHECK;
|
||||
// too expensive
|
||||
// INVARIANT_CHECK;
|
||||
|
||||
assert(c);
|
||||
try { assert(c->remote() == c->get_socket()->remote_endpoint()); }
|
||||
|
|
|
@ -809,7 +809,8 @@ namespace detail
|
|||
{
|
||||
mutex_t::scoped_lock l(m_mutex);
|
||||
|
||||
INVARIANT_CHECK;
|
||||
// too expensive
|
||||
// INVARIANT_CHECK;
|
||||
|
||||
connection_map::iterator p = m_connections.find(s);
|
||||
|
||||
|
@ -841,7 +842,8 @@ namespace detail
|
|||
{
|
||||
mutex_t::scoped_lock l(m_mutex);
|
||||
|
||||
INVARIANT_CHECK;
|
||||
// too expensive
|
||||
// INVARIANT_CHECK;
|
||||
|
||||
assert(p->is_disconnecting());
|
||||
connection_map::iterator i = m_connections.find(p->get_socket());
|
||||
|
@ -2067,7 +2069,8 @@ namespace detail
|
|||
{
|
||||
mutex_t::scoped_lock l(m_mutex);
|
||||
|
||||
INVARIANT_CHECK;
|
||||
// too expensive
|
||||
// INVARIANT_CHECK;
|
||||
|
||||
if (m_alerts.pending())
|
||||
return m_alerts.get();
|
||||
|
|
Loading…
Reference in New Issue