From fa40cf38aa32e2df238456ef6250a3851f54adce Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 4 Feb 2011 06:55:39 +0000 Subject: [PATCH] demoted some errors to regular disconnect messages --- src/bt_peer_connection.cpp | 10 +++++----- src/peer_connection.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bt_peer_connection.cpp b/src/bt_peer_connection.cpp index 9c165c236..c5763fd13 100644 --- a/src/bt_peer_connection.cpp +++ b/src/bt_peer_connection.cpp @@ -2470,7 +2470,7 @@ namespace libtorrent m_statistics.received_bytes(0, bytes_transferred); if (packet_finished()) - disconnect(errors::sync_hash_not_found, 2); + disconnect(errors::sync_hash_not_found, 1); return; } @@ -2504,7 +2504,7 @@ namespace libtorrent m_sync_bytes_read += bytes_processed; if (m_sync_bytes_read >= 512) { - disconnect(errors::sync_hash_not_found, 2); + disconnect(errors::sync_hash_not_found, 1); return; } @@ -2578,7 +2578,7 @@ namespace libtorrent if (!m_RC4_handler.get()) { - disconnect(errors::invalid_info_hash, 2); + disconnect(errors::invalid_info_hash, 1); return; } @@ -2962,7 +2962,7 @@ namespace libtorrent TORRENT_ASSERT((!is_local() && m_encrypted) || is_local()); #endif // #ifndef TORRENT_DISABLE_ENCRYPTION - disconnect(errors::invalid_info_hash, 2); + disconnect(errors::invalid_info_hash, 1); return; } @@ -3048,7 +3048,7 @@ namespace libtorrent #ifdef TORRENT_VERBOSE_LOGGING peer_log("*** received invalid info_hash"); #endif - disconnect(errors::invalid_info_hash, 2); + disconnect(errors::invalid_info_hash, 1); return; } diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index fd97e5a24..ad6d6f607 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -1173,7 +1173,7 @@ namespace libtorrent peer_log(" %s", to_hex(i->second->torrent_file().info_hash().to_string()).c_str()); } #endif - disconnect(errors::invalid_info_hash, 2); + disconnect(errors::invalid_info_hash, 1); return; }