MCPcopy
hub / github.com/coder/mux / closeAllSessions

Method closeAllSessions

src/node/services/ptyService.ts:315–319  ·  view source on GitHub ↗

* Close all terminal sessions. * Called during server shutdown to prevent orphan PTY processes.

()

Source from the content-addressed store, hash-verified

313 * Called during server shutdown to prevent orphan PTY processes.
314 */
315 closeAllSessions(): void {
316 const sessionIds = Array.from(this.sessions.keys());
317 log.info(`Closing all ${sessionIds.length} terminal session(s)`);
318 sessionIds.forEach((id) => this.closeSession(id));
319 }
320
321 /**
322 * Get all sessions for debugging

Callers 2

cleanupFunction · 0.45

Calls 1

closeSessionMethod · 0.95

Tested by

no test coverage detected