From bf6041264047b6fa64e50dbe57fddcb3b9caab03 Mon Sep 17 00:00:00 2001 From: alexz Date: Sat, 17 Jan 2026 17:57:46 +0000 Subject: [PATCH] Use test_connection function for keepalive check Replaces inline ping with existing test_connection function --- apps/cistech-tunnel/shared/openconnect-vpn | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/cistech-tunnel/shared/openconnect-vpn b/apps/cistech-tunnel/shared/openconnect-vpn index 6d74304..0a652ad 100755 --- a/apps/cistech-tunnel/shared/openconnect-vpn +++ b/apps/cistech-tunnel/shared/openconnect-vpn @@ -521,11 +521,7 @@ start_watchdog() { # Keepalive ping every 5 minutes if [ $((now - last_keepalive)) -ge $keepalive_interval ]; then - if [[ -n "$IBMI_HOST" ]] && ping -c 1 -W 5 "$IBMI_HOST" &>/dev/null; then - log DEBUG "Keepalive ping to $IBMI_HOST successful" - else - log WARN "Keepalive ping to $IBMI_HOST failed (VPN may be degraded)" - fi + test_connection || log WARN "VPN may be degraded" last_keepalive=$now fi else