From bdada3766acd7bc6b85d4e0b037ac72d6b4c3711 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 4 Jul 2012 16:13:20 +0000 Subject: [PATCH] peer disconnect fix --- src/peer_connection.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 51743439c..9de8077f0 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -2416,6 +2416,8 @@ namespace libtorrent , p.piece, _1)); } + if (is_disconnecting()) return; + #ifdef TORRENT_STATS ++m_ses.m_incoming_piece_picks; #endif