From d3fc1ff5114714767d2494bc015c4403d99a5c41 Mon Sep 17 00:00:00 2001 From: Artem Sheremet Date: Wed, 5 Aug 2026 20:56:07 +0000 Subject: [PATCH] Improve ssh loop responsiveness --- migrated/.zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migrated/.zshrc b/migrated/.zshrc index aa92853..e098d5e 100644 --- a/migrated/.zshrc +++ b/migrated/.zshrc @@ -171,8 +171,8 @@ osh() { local PARENT_PID=$$ ( while kill -0 $PARENT_PID 2>/dev/null; do - ssh -O check "$DEST" 2>/dev/null || ssh -A -f -o ControlPersist=yes "$DEST" "sleep 2592000" - sleep 5 + ssh -O check "$DEST" 2>/dev/null || ssh -A -o ServerAliveInterval=2 -o ServerAliveCountMax=3 -o ControlPersist=yes "$DEST" "sleep 2592000" + sleep 1 done ) & local loop_pid=$!