infinite interval when under 0
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/24 22:49:22 by tomoron #+# #+# */
|
||||
/* Updated: 2025/08/24 17:08:44 by tomoron ### ########.fr */
|
||||
/* Updated: 2025/08/24 19:55:45 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
#include "includes/ft_ping.h"
|
||||
@ -69,7 +69,7 @@ t_waitlist *send_icmp(t_settings *set, struct addrinfo *host, uint16_t *seq, t_s
|
||||
t_waitlist *ret;
|
||||
size_t len;
|
||||
|
||||
if(timediff(&set->last_send_time) < set->interval)
|
||||
if(timediff(&set->last_send_time) < set->interval || (set->interval < 0 && stats->sent))
|
||||
return (0);
|
||||
gettimeofday(&set->last_send_time, 0);
|
||||
packet = prepare_icmp_echo(*seq, set->id);
|
||||
|
Reference in New Issue
Block a user