Enhance error handling in ssh_mud function by temporarily disabling exit on error. This allows for graceful handling of MUD connection closures without terminating the script prematurely.
Some checks failed
Smoke tests / Build and smoke test (push) Has been cancelled

This commit is contained in:
AI Agent
2026-03-14 18:32:54 -06:00
parent f2f1699351
commit 2157b45486

View File

@@ -6,8 +6,10 @@ SERVER_PID=
# SSH returns 255 when MUD closes connection after quit — treat as success # SSH returns 255 when MUD closes connection after quit — treat as success
ssh_mud() { ssh_mud() {
set +e
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p 2222 "$@" ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p 2222 "$@"
r=$? r=$?
set -e
[[ $r -eq 0 || $r -eq 255 ]] || exit 1 [[ $r -eq 0 || $r -eq 255 ]] || exit 1
} }