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
Some checks failed
Smoke tests / Build and smoke test (push) Has been cancelled
This commit is contained in:
@@ -6,8 +6,10 @@ SERVER_PID=
|
||||
|
||||
# SSH returns 255 when MUD closes connection after quit — treat as success
|
||||
ssh_mud() {
|
||||
set +e
|
||||
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p 2222 "$@"
|
||||
r=$?
|
||||
set -e
|
||||
[[ $r -eq 0 || $r -eq 255 ]] || exit 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user