2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

[master] fix memory growth problem

4733.	[bug]		Change #4706 introduced a bug causing TCP clients
			not be reused correctly, leading to unconstrained
			memory growth. [RT #46029]
This commit is contained in:
Evan Hunt
2017-09-20 12:12:02 -07:00
parent 924d93d4e7
commit 7a2112ff7d
3 changed files with 9 additions and 3 deletions

View File

@@ -3487,7 +3487,7 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
* if that fails, make a new one.
*/
client = NULL;
if ((manager->sctx->options & NS_SERVER_CLIENTTEST) != 0)
if ((manager->sctx->options & NS_SERVER_CLIENTTEST) == 0)
ISC_QUEUE_POP(manager->inactive, ilink, client);
if (client != NULL)
@@ -3551,7 +3551,7 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock) {
* if that fails, make a new one.
*/
client = NULL;
if ((manager->sctx->options & NS_SERVER_CLIENTTEST) != 0)
if ((manager->sctx->options & NS_SERVER_CLIENTTEST) == 0)
ISC_QUEUE_POP(manager->inactive, ilink, client);
if (client != NULL)