From: Guus Sliepen Date: Mon, 12 Jul 2021 19:55:16 +0000 (+0200) Subject: Use usleep() instead of nanosleep(). X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=4221e7a37f375ec8f72a64879b3cc0c2e91c6328;p=meshlink-tiny Use usleep() instead of nanosleep(). --- 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) {