move handling of upload_only message to after plugins has a chance to react

This commit is contained in:
Arvid Norberg 2010-07-08 00:02:38 +00:00
parent 92593abf89
commit 079109f657
1 changed files with 7 additions and 7 deletions

View File

@ -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;
}