diff --git a/lib/base/workqueue.cpp b/lib/base/workqueue.cpp index ae3dad9b0..7e8ad5890 100644 --- a/lib/base/workqueue.cpp +++ b/lib/base/workqueue.cpp @@ -24,6 +24,7 @@ #include "base/application.hpp" #include "base/exception.hpp" #include +#include using namespace icinga; @@ -221,7 +222,7 @@ void WorkQueue::StatusTimerHandler() if (pending > GetTaskCount(5)) { timeInfo = " empty in "; - if (timeToZero < 0) + if (timeToZero < 0 || std::isinf(timeToZero)) timeInfo += "infinite time, your task handler isn't able to keep up"; else timeInfo += Utility::FormatDuration(timeToZero);