From 3c364731e858ecd2ca5546b3cae94217732ce23a Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 17 Jan 2010 21:26:47 +0000 Subject: [PATCH] don't ever send allowed fast messages to peers that doesn't support fast extensions --- src/bt_peer_connection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bt_peer_connection.cpp b/src/bt_peer_connection.cpp index f82effd85..eb36e177b 100644 --- a/src/bt_peer_connection.cpp +++ b/src/bt_peer_connection.cpp @@ -329,9 +329,10 @@ namespace libtorrent { INVARIANT_CHECK; + if (!m_supports_fast) return; + TORRENT_ASSERT(m_sent_handshake && m_sent_bitfield); TORRENT_ASSERT(associated_torrent().lock()->valid_metadata()); - TORRENT_ASSERT(m_supports_fast); char msg[] = {0,0,0,5, msg_allowed_fast, 0, 0, 0, 0}; char* ptr = msg + 5;