From: Evan Hunt Date: Fri, 10 Apr 2020 23:59:24 +0000 (-0700) Subject: shorten the sleep in isc_nm_destroy() X-Git-Tag: v9.17.3~49^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=870204fe47b093b3a0ff43f6f20696c63b9582d5;p=thirdparty%2Fbind9.git shorten the sleep in isc_nm_destroy() when isc_nm_destroy() is called, there's a loop that waits for other references to be detached, pausing and unpausing the netmgr to ensure that all the workers' events are run, followed by a 1-second sleep. this caused a delay on shutdown which will be noticeable when netmgr is used in tools other than named itself, so the delay has now been reduced to a hundredth of a second. --- diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index 0f45cc90d53..bf0f8efdd41 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -417,9 +417,9 @@ isc_nm_destroy(isc_nm_t **mgr0) { isc_nm_pause(mgr); isc_nm_resume(mgr); #ifdef WIN32 - _sleep(1000); + _sleep(10); #else /* ifdef WIN32 */ - usleep(1000000); + usleep(10000); #endif /* ifdef WIN32 */ }