From f5d80a335fe6b181a56123fc079b081b9681a530 Mon Sep 17 00:00:00 2001 From: zdmx Date: Sat, 28 Sep 2024 11:20:25 +0200 Subject: [PATCH] succd: remove redundant if --- succbone/succd/process.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/succbone/succd/process.go b/succbone/succd/process.go index 536e8b7..8ebf220 100644 --- a/succbone/succd/process.go +++ b/succbone/succd/process.go @@ -104,10 +104,8 @@ func (d *daemon) processOnce(_ context.Context) error { mbar := d.piraniMbar3.mbar if !d.safety.failsafe && mbar < 4e-6 { // Unrealistic result, Pirani probe probably disconnected. Failsafe mode. - if !d.safety.failsafe { - d.safety.failsafe = true - klog.Errorf("SAFETY: Pirani probe seems disconnected; enabling failsafe mode") - } + d.safety.failsafe = true + klog.Errorf("SAFETY: Pirani probe seems disconnected; enabling failsafe mode") } if d.safety.failsafe && mbar > 1e2 { d.safety.failsafe = false