Give global.maxthrpertgroup its default value at global creation,
instead of later when we're trying to detect the thread count.
It is used when verifying the configuration file validity, and if it was
not set in the config file, in a few corner cases, the value of 0 would
be used, which would then reject perfectly fine configuration files.
This should be backported to 3.3.
#endif
/* by default allow clients which use a privileged port for TCP only */
.clt_privileged_ports = HA_PROTO_TCP,
+ .maxthrpertgroup = MAX_THREADS_PER_GROUP,
/* others NULL OK */
};
if (global.nbtgroups)
grp_min = grp_max = global.nbtgroups;
- if (!global.maxthrpertgroup)
- global.maxthrpertgroup = MAX_THREADS_PER_GROUP;
-
#if defined(USE_THREAD)
/* Adjust to boot settings if not forced */
if (thr_min <= thread_cpus_enabled_at_boot && thread_cpus_enabled_at_boot < thr_max)