mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Lowered the route to friend minimum number of peers.
This fixes hole punching for some NATs.
This commit is contained in:
parent
c7b8d49c8c
commit
8d3fd0800a
|
@ -1554,7 +1554,7 @@ int route_tofriend(DHT *dht, uint8_t *friend_id, uint8_t *packet, uint32_t lengt
|
||||||
IP_Port ip_list[MAX_FRIEND_CLIENTS];
|
IP_Port ip_list[MAX_FRIEND_CLIENTS];
|
||||||
int ip_num = friend_iplist(dht, ip_list, num);
|
int ip_num = friend_iplist(dht, ip_list, num);
|
||||||
|
|
||||||
if (ip_num < (MAX_FRIEND_CLIENTS / 2))
|
if (ip_num < (MAX_FRIEND_CLIENTS / 4))
|
||||||
return 0; /* Reason for that? */
|
return 0; /* Reason for that? */
|
||||||
|
|
||||||
DHT_Friend *friend = &dht->friends_list[num];
|
DHT_Friend *friend = &dht->friends_list[num];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user