mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
2979. [bug] named could deadlock during shutdown if two
"rndc stop" commands were issued at the same time. [RT #22108]
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: socket.c,v 1.331 2010/12/03 00:54:39 marka Exp $ */
|
||||
/* $Id: socket.c,v 1.332 2010/12/03 22:05:19 each Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -5115,6 +5115,12 @@ isc__socket_accept(isc_socket_t *sock0,
|
||||
* Attach to socket and to task.
|
||||
*/
|
||||
isc_task_attach(task, &ntask);
|
||||
if (isc_task_exiting(ntask)) {
|
||||
isc_task_detach(&ntask);
|
||||
isc_event_free(ISC_EVENT_PTR(&dev));
|
||||
UNLOCK(&sock->lock);
|
||||
return (ISC_R_SHUTTINGDOWN);
|
||||
}
|
||||
nsock->references++;
|
||||
nsock->statsindex = sock->statsindex;
|
||||
|
||||
|
Reference in New Issue
Block a user