Merge pull request #1436 from CPbN/rebootwindow

Use true given window range, not twice
This commit is contained in:
qgarnier 2019-03-21 13:33:11 +01:00 committed by GitHub
commit 2ec70ce5b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -80,8 +80,8 @@ sub check_overload {
my $overflow = ($old_uptime + $diff_time) % 4294967296;
my $division = ($old_uptime + $diff_time) / 4294967296;
if ($division >= 1 &&
$overflow >= ($options{timeticks} - $self->{option_results}->{reboot_window}) &&
$overflow <= ($options{timeticks} + $self->{option_results}->{reboot_window})) {
$overflow >= ($options{timeticks} - ($self->{option_results}->{reboot_window} / 2)) &&
$overflow <= ($options{timeticks} + ($self->{option_results}->{reboot_window} / 2))) {
$self->{new_datas}->{overload}++;
} else {
$self->{new_datas}->{overload} = 0;