mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
3011. [func] Change the default query timeout from 30 seconds
to 10. Allow setting this in named.conf using the new 'resolver-query-timeout' option, which specifies a max time in seconds. 0 means 'default' and anything longer than 30 will be silently set to 30. [RT #22852]
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: socket.c,v 1.333 2010/12/22 03:08:36 marka Exp $ */
|
||||
/* $Id: socket.c,v 1.334 2011/02/03 05:41:54 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
|
||||
#ifndef USE_WATCHER_THREAD
|
||||
#include "socket_p.h"
|
||||
#include "../task_p.h"
|
||||
#endif /* USE_WATCHER_THREAD */
|
||||
|
||||
#if defined(SO_BSDCOMPAT) && defined(__linux__)
|
||||
@@ -4262,38 +4263,32 @@ isc__socketmgr_destroy(isc_socketmgr_t **managerp) {
|
||||
REQUIRE(VALID_MANAGER(manager));
|
||||
|
||||
#ifdef USE_SHARED_MANAGER
|
||||
if (manager->refs > 1) {
|
||||
manager->refs--;
|
||||
manager->refs--;
|
||||
if (manager->refs > 0) {
|
||||
*managerp = NULL;
|
||||
return;
|
||||
}
|
||||
socketmgr = NULL;
|
||||
#endif /* USE_SHARED_MANAGER */
|
||||
|
||||
LOCK(&manager->lock);
|
||||
|
||||
#ifdef USE_WATCHER_THREAD
|
||||
/*
|
||||
* Wait for all sockets to be destroyed.
|
||||
*/
|
||||
while (!ISC_LIST_EMPTY(manager->socklist)) {
|
||||
#ifdef USE_WATCHER_THREAD
|
||||
manager_log(manager, CREATION, "%s",
|
||||
isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
|
||||
ISC_MSG_SOCKETSREMAIN,
|
||||
"sockets exist"));
|
||||
WAIT(&manager->shutdown_ok, &manager->lock);
|
||||
}
|
||||
#else /* USE_WATCHER_THREAD */
|
||||
/*
|
||||
* Hope all sockets have been destroyed.
|
||||
*/
|
||||
if (!ISC_LIST_EMPTY(manager->socklist)) {
|
||||
manager_log(manager, CREATION, "%s",
|
||||
isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
|
||||
ISC_MSG_SOCKETSREMAIN,
|
||||
"sockets exist"));
|
||||
INSIST(0);
|
||||
}
|
||||
UNLOCK(&manager->lock);
|
||||
isc__taskmgr_dispatch(NULL);
|
||||
LOCK(&manager->lock);
|
||||
#endif /* USE_WATCHER_THREAD */
|
||||
}
|
||||
|
||||
UNLOCK(&manager->lock);
|
||||
|
||||
|
Reference in New Issue
Block a user