*** empty log message ***

This commit is contained in:
Arvid Norberg 2004-01-15 20:03:23 +00:00
parent 3f8f6f7e19
commit 671b38d87d
1 changed files with 40 additions and 36 deletions

View File

@ -460,6 +460,46 @@ namespace libtorrent
break;
}
#ifndef NDEBUG
assert_invariant();
#endif
// ************************
// SEND SOCKETS
// ************************
// let the writable clients send data
for (std::vector<boost::shared_ptr<socket> >::iterator i
= writable_clients.begin();
i != writable_clients.end();
++i)
{
assert((*i)->is_writable());
connection_map::iterator p = m_connections.find(*i);
// the connection may have been disconnected in the receive phase
if (p == m_connections.end())
{
m_selector.remove(*i);
}
else
{
try
{
assert(m_selector.is_writability_monitored(p->first));
assert(p->second->has_data());
assert(p->second->get_socket()->is_writable());
p->second->send_data();
}
catch(std::exception&)
{
// the connection wants to disconnect for some reason, remove it
// from the connection-list
m_selector.remove(*i);
m_connections.erase(p);
}
}
}
#ifndef NDEBUG
assert_invariant();
#endif
@ -531,42 +571,6 @@ namespace libtorrent
assert_invariant();
#endif
// ************************
// SEND SOCKETS
// ************************
// let the writable clients send data
for (std::vector<boost::shared_ptr<socket> >::iterator i
= writable_clients.begin();
i != writable_clients.end();
++i)
{
assert((*i)->is_writable());
connection_map::iterator p = m_connections.find(*i);
// the connection may have been disconnected in the receive phase
if (p == m_connections.end())
{
m_selector.remove(*i);
}
else
{
try
{
assert(m_selector.is_writability_monitored(p->first));
assert(p->second->has_data());
assert(p->second->get_socket()->is_writable());
p->second->send_data();
}
catch(std::exception&)
{
// the connection wants to disconnect for some reason, remove it
// from the connection-list
m_selector.remove(*i);
m_connections.erase(p);
}
}
}
// ************************
// ERROR SOCKETS
// ************************