linger flag seems to work now
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/26 19:54:25 by tomoron #+# #+# */
|
||||
/* Updated: 2025/05/22 15:24:43 by tomoron ### ########.fr */
|
||||
/* Updated: 2025/05/22 23:01:33 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -85,7 +85,7 @@ int ping_host(t_settings *set, char *host)
|
||||
usleep(100);
|
||||
receive_icmp(set, info, &wl, &stats);
|
||||
}
|
||||
while(wl && !g_stop)
|
||||
while(wl && !g_stop && timediff(&set->last_send_time) < set->linger)
|
||||
receive_icmp(set, info, &wl, &stats);
|
||||
ping_end_print(set, host, &stats);
|
||||
freeaddrinfo(info);
|
||||
|
Reference in New Issue
Block a user