From 079109f657e6de5648d076e96a14e36389f25a84 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 8 Jul 2010 00:02:38 +0000 Subject: [PATCH] move handling of upload_only message to after plugins has a chance to react --- src/bt_peer_connection.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bt_peer_connection.cpp b/src/bt_peer_connection.cpp index 8b87addc5..5176fea75 100644 --- a/src/bt_peer_connection.cpp +++ b/src/bt_peer_connection.cpp @@ -1479,13 +1479,6 @@ namespace libtorrent return; } - if (extended_id == upload_only_msg) - { - if (!packet_finished()) return; - set_upload_only(detail::read_uint8(recv_buffer.begin)); - return; - } - #ifndef TORRENT_DISABLE_EXTENSIONS for (extension_list_t::iterator i = m_extensions.begin() , end(m_extensions.end()); i != end; ++i) @@ -1496,6 +1489,13 @@ namespace libtorrent } #endif + if (extended_id == upload_only_msg) + { + if (!packet_finished()) return; + set_upload_only(detail::read_uint8(recv_buffer.begin)); + return; + } + disconnect(errors::invalid_message, 2); return; }