mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
And fix reponse generation when reducing the number of threads.
git-svn-id: file:///svn/unbound/trunk@3457 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
d889832892
commit
cd223885eb
1 changed files with 6 additions and 0 deletions
|
|
@ -399,6 +399,12 @@ daemon_create_workers(struct daemon* daemon)
|
||||||
verbose(VERB_ALGO, "total of %d outgoing ports available", numport);
|
verbose(VERB_ALGO, "total of %d outgoing ports available", numport);
|
||||||
|
|
||||||
daemon->num = (daemon->cfg->num_threads?daemon->cfg->num_threads:1);
|
daemon->num = (daemon->cfg->num_threads?daemon->cfg->num_threads:1);
|
||||||
|
if(daemon->reuseport && (int)daemon->num < (int)daemon->num_ports) {
|
||||||
|
log_warn("cannot reduce num-threads to %d because so-reuseport "
|
||||||
|
"so continuing with %d threads.", (int)daemon->num,
|
||||||
|
(int)daemon->num_ports);
|
||||||
|
daemon->num = daemon->num_ports;
|
||||||
|
}
|
||||||
daemon->workers = (struct worker**)calloc((size_t)daemon->num,
|
daemon->workers = (struct worker**)calloc((size_t)daemon->num,
|
||||||
sizeof(struct worker*));
|
sizeof(struct worker*));
|
||||||
if(daemon->cfg->dnstap) {
|
if(daemon->cfg->dnstap) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue