diff --git a/toxcore/ping.c b/toxcore/ping.c index e00036af..4f715ea2 100644 --- a/toxcore/ping.c +++ b/toxcore/ping.c @@ -39,10 +39,10 @@ #define PING_NUM_MAX 512 /* Maximum newly announced nodes to ping per TIME_TO_PING seconds. */ -#define MAX_TO_PING 8 +#define MAX_TO_PING 16 /* Ping newly announced nodes to ping per TIME_TO_PING seconds*/ -#define TIME_TO_PING 8 +#define TIME_TO_PING 4 struct PING { @@ -301,6 +301,9 @@ void do_to_ping(PING *ping) if (!is_timeout(ping->last_to_ping, TIME_TO_PING)) return; + if (!ip_isset(&ping->to_ping[0].ip_port.ip)) + return; + ping->last_to_ping = unix_time(); uint32_t i;