From f2e3e613b2e30bd3113de7eb1ad1eefec66cf21f Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 6 Oct 2013 01:48:57 +0000 Subject: [PATCH] merged dht fix from libtorrent_aio --- src/kademlia/rpc_manager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/kademlia/rpc_manager.cpp b/src/kademlia/rpc_manager.cpp index b90c95da6..9a6b156f7 100644 --- a/src/kademlia/rpc_manager.cpp +++ b/src/kademlia/rpc_manager.cpp @@ -323,6 +323,7 @@ bool rpc_manager::incoming(msg const& m, node_id* id) lazy_entry const* ret_ent = m.message.dict_find_dict("r"); if (ret_ent == 0) { + o->timeout(); entry e; incoming_error(e, "missing 'r' key"); m_sock->send_packet(e, m.addr, 0); @@ -332,6 +333,7 @@ bool rpc_manager::incoming(msg const& m, node_id* id) lazy_entry const* node_id_ent = ret_ent->dict_find_string("id"); if (node_id_ent == 0 || node_id_ent->string_length() != 20) { + o->timeout(); entry e; incoming_error(e, "missing 'id' key"); m_sock->send_packet(e, m.addr, 0);