This commit is contained in:
@@ -363,9 +363,13 @@ export function registerTerminalHandlers(session) {
|
||||
const sessions = getSessions(session)
|
||||
const sessionId = resolveSessionId(args)
|
||||
|
||||
// Always clear any prior PTY for this id/container before opening a new one.
|
||||
// Prevents races where a late killTerminal and a re-entry startTerminal overlap,
|
||||
// and avoids "stuck" sessions when the client re-enters the Terminal tab.
|
||||
if (sessions.has(sessionId)) {
|
||||
endOne(sessions, sessionId)
|
||||
}
|
||||
cleanupTerminalsForContainer(session, containerId)
|
||||
|
||||
const useTty = args.tty !== false
|
||||
const shellCandidates = buildShellCandidates(args)
|
||||
|
||||
Reference in New Issue
Block a user