From adb250cf5cb0ac5e6d8f49a7f3a20c3993e721d3 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 4 Feb 2011 07:14:00 +0000 Subject: [PATCH] fixed missing logging of peer disconnects --- parse_session_stats.py | 2 +- src/peer_connection.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/parse_session_stats.py b/parse_session_stats.py index acc7a8796..07cd5988f 100755 --- a/parse_session_stats.py +++ b/parse_session_stats.py @@ -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']) diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index ad6d6f607..b4dc8035c 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -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;