We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c7d255 commit 4b3073aCopy full SHA for 4b3073a
1 file changed
packages/server/src/session/manager.ts
@@ -157,9 +157,15 @@ export class SessionManager {
157
158
await this.deps.terminalMgr.close(session.terminalId);
159
160
- if (this.sessions.has(session.id) && session.state !== "ended") {
161
- this.finishSession(session, this.terminalToSession.has(session.terminalId) ? undefined : 0);
+ const latestSession = this.sessions.get(session.id);
+ if (!latestSession || latestSession.state === "ended") {
162
+ return;
163
}
164
+
165
+ this.finishSession(
166
+ latestSession,
167
+ this.terminalToSession.has(latestSession.terminalId) ? undefined : 0
168
+ );
169
170
171
async hydrate(): Promise<void> {
0 commit comments