Skip to content
Snippets Groups Projects
Commit 81ea497e authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Fix resetting the probation counter.

On an integer overflow while being in low-load state the probation
counter should not be reset to zero (indicating the load limit was
violated) but rather to the lowest value representing a valid load
(being _probation + 1).

Refers to #36
parent 126d438c
No related branches found
No related tags found
No related merge requests found
......@@ -128,7 +128,7 @@ namespace ATxCommon.Monitoring
Log.Trace("CPU load behaving well since {0} cycles.", _behaving);
} else if (_behaving < 0) {
Log.Warn("Integer wrap around happened, resetting probation counter!");
_behaving = 0;
_behaving = _probation + 1;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment