diff --git a/LibreNMS/Proc.php b/LibreNMS/Proc.php index f0cf3e05c6..cf1926a0d6 100644 --- a/LibreNMS/Proc.php +++ b/LibreNMS/Proc.php @@ -176,8 +176,12 @@ class Proc public function close($command = null) { if (isset($command)) { - if (is_resource($this->_pipes[0])) { - $this->sendInput($this->checkAddEOL($command)); + try { + if (is_resource($this->_pipes[0])) { + $this->sendInput($this->checkAddEOL($command)); + } + } catch (\ErrorException $e) { + // might have closed already } }