summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/onion_client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c
index 42982ea8..96831beb 100644
--- a/toxcore/onion_client.c
+++ b/toxcore/onion_client.c
@@ -966,7 +966,8 @@ int onion_set_friend_online(Onion_Client *onion_c, int friend_num, uint8_t is_on
966} 966}
967 967
968 968
969#define ANNOUNCE_FRIEND ONION_NODE_PING_INTERVAL 969#define ANNOUNCE_FRIEND (ONION_NODE_PING_INTERVAL * 3)
970#define FRIEND_ONION_NODE_TIMEOUT (ONION_NODE_TIMEOUT * 3)
970 971
971static void do_friend(Onion_Client *onion_c, uint16_t friendnum) 972static void do_friend(Onion_Client *onion_c, uint16_t friendnum)
972{ 973{
@@ -981,7 +982,7 @@ static void do_friend(Onion_Client *onion_c, uint16_t friendnum)
981 982
982 if (!onion_c->friends_list[friendnum].is_online) { 983 if (!onion_c->friends_list[friendnum].is_online) {
983 for (i = 0; i < MAX_ONION_CLIENTS; ++i) { 984 for (i = 0; i < MAX_ONION_CLIENTS; ++i) {
984 if (is_timeout(list_nodes[i].timestamp, ONION_NODE_TIMEOUT)) 985 if (is_timeout(list_nodes[i].timestamp, FRIEND_ONION_NODE_TIMEOUT))
985 continue; 986 continue;
986 987
987 ++count; 988 ++count;