From 4221e7a37f375ec8f72a64879b3cc0c2e91c6328 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 12 Jul 2021 21:55:16 +0200 Subject: [PATCH] Use usleep() instead of nanosleep(). --- src/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.c b/src/net.c index d930d1f..c09ea80 100644 --- a/src/net.c +++ b/src/net.c @@ -151,7 +151,7 @@ static void periodic_handler(event_loop_t *loop, void *data) { if(mesh->contradicting_del_edge > 100 && mesh->contradicting_add_edge > 100) { logger(mesh, MESHLINK_WARNING, "Possible node with same Name as us! Sleeping %d seconds.", mesh->sleeptime); struct timespec ts = {mesh->sleeptime, 0}; - nanosleep(&ts, NULL); + usleep(ts.tv_sec * 1000000); mesh->sleeptime *= 2; if(mesh->sleeptime < 0) { -- 2.39.5