summaryrefslogtreecommitdiff
path: root/internal/server/handlers/serverhandler.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server/handlers/serverhandler.go')
-rw-r--r--internal/server/handlers/serverhandler.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/server/handlers/serverhandler.go b/internal/server/handlers/serverhandler.go
index e8c234b..79d03b8 100644
--- a/internal/server/handlers/serverhandler.go
+++ b/internal/server/handlers/serverhandler.go
@@ -98,7 +98,7 @@ func (h *ServerHandler) handleUserCommand(ctx context.Context, ltx lcontext.LCon
// Only shutdown if no active commands AND no pending files.
// AUTHKEY is a session-side effect command and should not terminate the shell
// because user commands may still follow in the same session.
- if shutdownOnCompletion && activeCommands == 0 && pendingFiles == 0 {
+ if shutdownOnCompletion && activeCommands == 0 && pendingFiles == 0 && !h.sessionState.keepAlive() {
h.shutdown()
}
}