mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-21 12:44:58 +02:00
Make sure flapping counters aren't negative.
This commit is contained in:
parent
8302062ead
commit
46b3f033cf
@ -77,6 +77,12 @@ void Service::UpdateFlappingStatus(bool stateChange)
|
||||
else
|
||||
negative += diff;
|
||||
|
||||
if (positive < 0)
|
||||
positive = 0;
|
||||
|
||||
if (negative < 0)
|
||||
negative = 0;
|
||||
|
||||
Log(LogDebug, "icinga", "Flapping counter for '" + GetName() + "' is positive=" + Convert::ToString(positive) + ", negative=" + Convert::ToString(negative));
|
||||
|
||||
m_FlappingPositive = positive;
|
||||
|
Loading…
x
Reference in New Issue
Block a user