Skip to content

Commit 6f4bfa8

Browse files
Ahmet OeztuerkAhmet Oeztuerk
authored andcommitted
use retry_interval when current_attempt != max_check_attempts
1 parent d2a41d4 commit 6f4bfa8

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/Thruk/Controller/extinfo.pm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,20 +1070,21 @@ sub _check_stale_check {
10701070
$next_planned_check = $last_check + $check_interval;
10711071
}
10721072
elsif ($state != 0 && $current_attempt != $max_check_attempts) {
1073-
$next_planned_check = $last_check + $check_interval;
1073+
$next_planned_check = $last_check + $retry_interval;
10741074
}
10751075
else{
1076-
$next_planned_check = $last_check + $retry_interval;
1076+
$next_planned_check = $last_check + $check_interval;
10771077
}
1078+
10781079
my $second_next_planned_check = 0;
10791080
if ($state == 0) {
10801081
$second_next_planned_check = $next_planned_check + $check_interval;
10811082
}
10821083
elsif ($state != 0 && $current_attempt != $max_check_attempts) {
1083-
$second_next_planned_check = $next_planned_check + $check_interval;
1084+
$second_next_planned_check = $next_planned_check + $retry_interval;
10841085
}
10851086
else{
1086-
$second_next_planned_check = $next_planned_check + $retry_interval;
1087+
$second_next_planned_check = $next_planned_check + $check_interval;
10871088
}
10881089

10891090
return(0) if $second_next_planned_check > time();

0 commit comments

Comments
 (0)