Browse Source

Fix another defect found by sonarqube

master
Bernhard Fröhlich 3 months ago
parent
commit
1fdc302c9c
Signed by: Bernhard Froehlich <decke@bluelife.at> GPG Key ID: 4DD88C3F9F3B8333
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      lib/PhpMonitor/Daemon.php

+ 3
- 2
lib/PhpMonitor/Daemon.php View File

@@ -42,9 +42,10 @@ class Daemon extends \Core_Daemon
{
$check = $this->getCheckForUrl($url);

if(($result = $check->execute($url)) === false) {
if($this->checks[$checkname]['status'] != 'down')
if($check->execute($url) === false) {
if($this->checks[$checkname]['status'] != 'down') {
$this->checks[$checkname]['status'] = 'pending';
}
$this->checks[$checkname]['failures']++;

if($this->checks[$checkname]['status'] == 'pending' && $this->checks[$checkname]['failures'] > Config::get('maxfailures', 3)) {

Loading…
Cancel
Save