X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fupnp.c;h=8223b2df24c9ada26bdae2aa1544600a8a300ff5;hb=72091d5c770856870bb8cd51bcc5641078c7562c;hp=eb68998bc26395b2b8ccb8562a733e1d380b7efb;hpb=28b7a53b693f6b4e70218a926e68a36ece54cda1;p=tinc diff --git a/src/upnp.c b/src/upnp.c index eb68998b..8223b2df 100644 --- a/src/upnp.c +++ b/src/upnp.c @@ -159,9 +159,7 @@ static void *upnp_thread(void *data) { time_t now = time(NULL); if(now < refresh_time) { - nanosleep(&(struct timespec) { - refresh_time - now, 0 - }, NULL); + sleep_millis((refresh_time - now) * 1000); } }