X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fupnp.c;h=8223b2df24c9ada26bdae2aa1544600a8a300ff5;hb=cfc9fee931c70554353ce6c4acc3407baac08745;hp=eb68998bc26395b2b8ccb8562a733e1d380b7efb;hpb=08f1e0cd33812f9d972dd7c59021443a8d02d0e0;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); } }