mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Increased ping interval time to decrease bandwidth usage.
This should not increase the time it takes for people to find themselves.
This commit is contained in:
parent
a679756eca
commit
545cc91662
|
@ -966,7 +966,8 @@ int onion_set_friend_online(Onion_Client *onion_c, int friend_num, uint8_t is_on
|
|||
}
|
||||
|
||||
|
||||
#define ANNOUNCE_FRIEND ONION_NODE_PING_INTERVAL
|
||||
#define ANNOUNCE_FRIEND (ONION_NODE_PING_INTERVAL * 3)
|
||||
#define FRIEND_ONION_NODE_TIMEOUT (ONION_NODE_TIMEOUT * 3)
|
||||
|
||||
static void do_friend(Onion_Client *onion_c, uint16_t friendnum)
|
||||
{
|
||||
|
@ -981,7 +982,7 @@ static void do_friend(Onion_Client *onion_c, uint16_t friendnum)
|
|||
|
||||
if (!onion_c->friends_list[friendnum].is_online) {
|
||||
for (i = 0; i < MAX_ONION_CLIENTS; ++i) {
|
||||
if (is_timeout(list_nodes[i].timestamp, ONION_NODE_TIMEOUT))
|
||||
if (is_timeout(list_nodes[i].timestamp, FRIEND_ONION_NODE_TIMEOUT))
|
||||
continue;
|
||||
|
||||
++count;
|
||||
|
|
Loading…
Reference in New Issue
Block a user