diff options
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/onion_client.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index 2bbe420e..d6d078e1 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c | |||
@@ -597,7 +597,9 @@ static int client_ping_nodes(Onion_Client *onion_c, uint32_t num, const Node_for | |||
597 | continue; | 597 | continue; |
598 | 598 | ||
599 | if (is_timeout(list_nodes[0].timestamp, ONION_NODE_TIMEOUT) | 599 | if (is_timeout(list_nodes[0].timestamp, ONION_NODE_TIMEOUT) |
600 | || id_closest(reference_id, list_nodes[0].public_key, nodes[i].public_key) == 2) { | 600 | || id_closest(reference_id, list_nodes[0].public_key, nodes[i].public_key) == 2 |
601 | || is_timeout(list_nodes[1].timestamp, ONION_NODE_TIMEOUT) | ||
602 | || id_closest(reference_id, list_nodes[1].public_key, nodes[i].public_key) == 2 ) { | ||
601 | /* check if node is already in list. */ | 603 | /* check if node is already in list. */ |
602 | for (j = 0; j < list_length; ++j) { | 604 | for (j = 0; j < list_length; ++j) { |
603 | if (memcmp(list_nodes[j].public_key, nodes[i].public_key, crypto_box_PUBLICKEYBYTES) == 0) { | 605 | if (memcmp(list_nodes[j].public_key, nodes[i].public_key, crypto_box_PUBLICKEYBYTES) == 0) { |