fixed missing logging of peer disconnects

This commit is contained in:
Arvid Norberg 2011-02-04 07:14:00 +00:00
parent fa40cf38aa
commit adb250cf5c
2 changed files with 2 additions and 1 deletions

View File

@ -53,5 +53,5 @@ gen_report('peer_ul_rates', ['peers up 0', 'peers up 0-2', 'peers up 2-5', 'peer
gen_report('disk', ['disk write queued bytes', 'disk block buffers'])
gen_report('peers_upload', ['peers up interested', 'peers up unchoked', 'peers up requests'])
gen_report('peers_download', ['peers down interesting', 'peers down unchoked', 'peers down requests'])
gen_report('peer_errors', ['error peers', 'peer disconnected', 'peers eof', 'peers connection reset'])
gen_report('peer_errors', ['error peers', 'peer disconnects', 'peers eof', 'peers connection reset'])

View File

@ -3318,6 +3318,7 @@ namespace libtorrent
#endif
#ifdef TORRENT_STATS
++m_ses.m_disconnected_peers;
if (error == 2) ++m_ses.m_error_peers;
if (ec == error::connection_reset) ++m_ses.m_connreset_peers;
if (ec == error::eof) ++m_ses.m_eof_peers;