mirror of https://github.com/Icinga/icinga2.git
Merge pull request #6430 from Icinga/fix/workqueue-log-message
Fix negative 'empty in' value in WorkQueue log message
This commit is contained in:
commit
62e91e1891
|
@ -24,6 +24,7 @@
|
|||
#include "base/application.hpp"
|
||||
#include "base/exception.hpp"
|
||||
#include <boost/thread/tss.hpp>
|
||||
#include <math.h>
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue