diff --git a/lib/isc/managers.c b/lib/isc/managers.c index 094e4c0eb8..b57f8ab7c6 100644 --- a/lib/isc/managers.c +++ b/lib/isc/managers.c @@ -27,10 +27,13 @@ isc_managers_create(isc_mem_t *mctx, size_t workers, size_t quantum, isc_timermgr_t *timermgr = NULL; /* - * We have ncpus network threads, ncpus old network threads - make - * it 4x just to be on the safe side. + * Currently, there are: + * - 1 main thread + * - 1 timer thread + * - n netmgr threads + * - n threadpool threads */ - isc_hp_init(4 * workers); + isc_hp_init(2 + 2 * workers); REQUIRE(netmgrp != NULL && *netmgrp == NULL); isc__netmgr_create(mctx, workers, &netmgr); diff --git a/lib/isc/tests/doh_test.c b/lib/isc/tests/doh_test.c index 117728554d..7a2c06571b 100644 --- a/lib/isc/tests/doh_test.c +++ b/lib/isc/tests/doh_test.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -256,6 +257,8 @@ _setup(void **state) { return (-1); } + isc_hp_init(4 * workers); + signal(SIGPIPE, SIG_IGN); return (0);