added dht_invalid_find_node counter metric

This commit is contained in:
Alden Torres 2017-01-17 18:43:52 -05:00 committed by Arvid Norberg
parent ef9d1ecd7f
commit c33af5a552
3 changed files with 3 additions and 0 deletions

View File

@ -238,6 +238,7 @@ namespace libtorrent
dht_invalid_announce,
dht_invalid_get_peers,
dht_invalid_find_node,
dht_invalid_put,
dht_invalid_get,

View File

@ -863,6 +863,7 @@ void node::incoming_request(msg const& m, entry& e)
bdecode_node msg_keys[2];
if (!verify_message(arg_ent, msg_desc, msg_keys, error_string))
{
m_counters.inc_stats_counter(counters::dht_invalid_find_node);
incoming_error(e, error_string);
return;
}

View File

@ -454,6 +454,7 @@ namespace libtorrent
// the number of failed incoming DHT requests by kind of request
METRIC(dht, dht_invalid_announce)
METRIC(dht, dht_invalid_get_peers)
METRIC(dht, dht_invalid_find_node)
METRIC(dht, dht_invalid_put)
METRIC(dht, dht_invalid_get)