[icinga-checkins] icinga.org: icinga2/master: Fix case where all threadpool threads are killed.

git at icinga.org git at icinga.org
Fri Apr 5 14:32:32 CEST 2013


Module: icinga2
Branch: master
Commit: 06839ba4b074260f5025fd30cb0f84a0f154a0af
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=06839ba4b074260f5025fd30cb0f84a0f154a0af

Author: Gunnar Beutner <gunnar at beutner.name>
Date:   Fri Apr  5 14:32:16 2013 +0200

Fix case where all threadpool threads are killed.

---

 lib/base/threadpool.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/base/threadpool.cpp b/lib/base/threadpool.cpp
index a789929..6627906 100644
--- a/lib/base/threadpool.cpp
+++ b/lib/base/threadpool.cpp
@@ -228,7 +228,7 @@ void ThreadPool::ManagerThreadProc(void)
 			else
 				avg_latency = 0;
 
-			if (utilization < 60 || utilization > 80) {
+			if (utilization < 60 || utilization > 80 || alive < 2) {
 				int tthreads = ceil((utilization * alive) / 80.0) - alive;
 
 				/* Don't ever kill the last 2 threads. */





More information about the icinga-checkins mailing list