diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-13 07:59:45 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-13 07:59:45 +0200 |
| commit | 6dbc03d5c7b6068665e2d95bc66c4f3700323dc8 (patch) | |
| tree | dc14218fd578caca6b0a7ada3ceb1a0f060a9a9e /internal/server/handlers/serverhandler.go | |
| parent | c88dddee1953c938b47830ec13696f23770eb22d (diff) | |
task 398: implement session preemption
Diffstat (limited to 'internal/server/handlers/serverhandler.go')
| -rw-r--r-- | internal/server/handlers/serverhandler.go | 2 |
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() } } |
