*** empty log message ***

This commit is contained in:
Arvid Norberg 2004-01-31 11:14:54 +00:00
parent 49e19dd363
commit e8fabd3735
3 changed files with 7 additions and 2 deletions

View File

@ -56,7 +56,7 @@ __ udp_tracker_protocol.html
Functions that are yet to be implemented: Functions that are yet to be implemented:
* better handling of peers that send bad data * better identification of peers that send bad data
* ip-filters * ip-filters
* file-level priority * file-level priority

View File

@ -146,7 +146,7 @@ namespace libtorrent
bool is_seed() const; bool is_seed() const;
bool has_timed_out() bool has_timed_out() const
{ {
boost::posix_time::time_duration d; boost::posix_time::time_duration d;
d = boost::posix_time::second_clock::local_time() - m_last_receive; d = boost::posix_time::second_clock::local_time() - m_last_receive;

View File

@ -702,6 +702,11 @@ namespace libtorrent
// close it. // close it.
if (j->second->has_timed_out()) if (j->second->has_timed_out())
{ {
if (m_alerts.should_post(alert::debug))
{
m_alerts.post_alert(
peer_error_alert(j->first->sender(), "connection timed out"));
}
m_selector.remove(j->first); m_selector.remove(j->first);
m_connections.erase(j); m_connections.erase(j);
assert(m_selector.count_read_monitors() == (int)m_connections.size() + 1); assert(m_selector.count_read_monitors() == (int)m_connections.size() + 1);