more asserts in peer_connection

This commit is contained in:
Arvid Norberg 2005-11-04 00:14:55 +00:00
parent 051aa5dbe0
commit ec7eb0ebd6
3 changed files with 3 additions and 2 deletions

View File

@ -126,6 +126,7 @@ namespace libtorrent
, m_metadata_progress(0)
{
m_selector.monitor_writability(m_socket);
m_selector.monitor_readability(m_socket);
INVARIANT_CHECK;
// these numbers are used the first second of connection.
@ -239,6 +240,7 @@ namespace libtorrent
, m_queued(false)
, m_metadata_progress(0)
{
m_selector.monitor_readability(m_socket);
INVARIANT_CHECK;
// upload bandwidth will only be given to connections
@ -2639,6 +2641,7 @@ namespace libtorrent
|| m_connecting);
assert(m_writability_monitored == m_selector.is_writability_monitored(m_socket));
assert(m_readability_monitored == m_selector.is_readability_monitored(m_socket));
/*
assert(m_num_pieces == std::count(

View File

@ -765,7 +765,6 @@ namespace libtorrent { namespace detail
assert(!c->is_connecting());
m_connections.insert(std::make_pair(s, c));
m_selector.monitor_readability(s);
m_selector.monitor_errors(s);
}
continue;

View File

@ -922,7 +922,6 @@ namespace libtorrent
m_policy->check_invariant();
#endif
m_ses.m_selector.monitor_readability(s);
m_ses.m_selector.monitor_errors(s);
m_ses.process_connection_queue();
return *c;