more asserts in peer_connection
This commit is contained in:
@@ -126,6 +126,7 @@ namespace libtorrent
|
|||||||
, m_metadata_progress(0)
|
, m_metadata_progress(0)
|
||||||
{
|
{
|
||||||
m_selector.monitor_writability(m_socket);
|
m_selector.monitor_writability(m_socket);
|
||||||
|
m_selector.monitor_readability(m_socket);
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
|
|
||||||
// these numbers are used the first second of connection.
|
// these numbers are used the first second of connection.
|
||||||
@@ -239,6 +240,7 @@ namespace libtorrent
|
|||||||
, m_queued(false)
|
, m_queued(false)
|
||||||
, m_metadata_progress(0)
|
, m_metadata_progress(0)
|
||||||
{
|
{
|
||||||
|
m_selector.monitor_readability(m_socket);
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
|
|
||||||
// upload bandwidth will only be given to connections
|
// upload bandwidth will only be given to connections
|
||||||
@@ -2639,6 +2641,7 @@ namespace libtorrent
|
|||||||
|| m_connecting);
|
|| m_connecting);
|
||||||
|
|
||||||
assert(m_writability_monitored == m_selector.is_writability_monitored(m_socket));
|
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(
|
assert(m_num_pieces == std::count(
|
||||||
|
@@ -765,7 +765,6 @@ namespace libtorrent { namespace detail
|
|||||||
|
|
||||||
assert(!c->is_connecting());
|
assert(!c->is_connecting());
|
||||||
m_connections.insert(std::make_pair(s, c));
|
m_connections.insert(std::make_pair(s, c));
|
||||||
m_selector.monitor_readability(s);
|
|
||||||
m_selector.monitor_errors(s);
|
m_selector.monitor_errors(s);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
@@ -922,7 +922,6 @@ namespace libtorrent
|
|||||||
m_policy->check_invariant();
|
m_policy->check_invariant();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_ses.m_selector.monitor_readability(s);
|
|
||||||
m_ses.m_selector.monitor_errors(s);
|
m_ses.m_selector.monitor_errors(s);
|
||||||
m_ses.process_connection_queue();
|
m_ses.process_connection_queue();
|
||||||
return *c;
|
return *c;
|
||||||
|
Reference in New Issue
Block a user