From b1c12d4c6956c56ac21a188c5965f99841cc73c6 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 17 Jan 2010 21:49:26 +0000 Subject: [PATCH] added debug assert when receiving garbage. Especially useful when running the unit tests --- src/bt_peer_connection.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bt_peer_connection.cpp b/src/bt_peer_connection.cpp index eb36e177b..09e5a14b4 100644 --- a/src/bt_peer_connection.cpp +++ b/src/bt_peer_connection.cpp @@ -1606,6 +1606,9 @@ namespace libtorrent #endif m_statistics.received_bytes(0, received); + // What's going on here?! + // break in debug builds to allow investigation + TORRENT_ASSERT(false); disconnect(errors::invalid_message); return packet_finished(); }