mirror of https://github.com/Icinga/icinga2.git
Fix case where all threadpool threads are killed.
This commit is contained in:
parent
1682ff2839
commit
06839ba4b0
|
@ -228,7 +228,7 @@ void ThreadPool::ManagerThreadProc(void)
|
||||||
else
|
else
|
||||||
avg_latency = 0;
|
avg_latency = 0;
|
||||||
|
|
||||||
if (utilization < 60 || utilization > 80) {
|
if (utilization < 60 || utilization > 80 || alive < 2) {
|
||||||
int tthreads = ceil((utilization * alive) / 80.0) - alive;
|
int tthreads = ceil((utilization * alive) / 80.0) - alive;
|
||||||
|
|
||||||
/* Don't ever kill the last 2 threads. */
|
/* Don't ever kill the last 2 threads. */
|
||||||
|
|
Loading…
Reference in New Issue