forked from premiere/premiere-libtorrent
*** empty log message ***
This commit is contained in:
parent
49e19dd363
commit
e8fabd3735
|
@ -56,7 +56,7 @@ __ udp_tracker_protocol.html
|
|||
|
||||
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
|
||||
* file-level priority
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ namespace libtorrent
|
|||
|
||||
bool is_seed() const;
|
||||
|
||||
bool has_timed_out()
|
||||
bool has_timed_out() const
|
||||
{
|
||||
boost::posix_time::time_duration d;
|
||||
d = boost::posix_time::second_clock::local_time() - m_last_receive;
|
||||
|
|
|
@ -702,6 +702,11 @@ namespace libtorrent
|
|||
// close it.
|
||||
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_connections.erase(j);
|
||||
assert(m_selector.count_read_monitors() == (int)m_connections.size() + 1);
|
||||
|
|
Loading…
Reference in New Issue