MCPcopy Create free account
hub / github.com/gnmyt/Nexterm / handleEnd

Method handleEnd

server/lib/ScriptLayer.js:154–162  ·  view source on GitHub ↗
(exitCode)

Source from the content-addressed store, hash-verified

152 }
153
154 handleEnd(exitCode) {
155 if (!this.running) return;
156 this.running = false;
157 if (this.buffer.trim()) this.processLine(this.buffer);
158 this.buffer = "";
159 this.broadcast(MSG.SCRIPT_END, { exitCode, success: exitCode === 0 });
160 logger.info("Script completed", { sessionId: this.sessionId, exitCode });
161 this.stream.removeListener("data", this.onData);
162 }
163
164 onClose(code) { if (this.running) this.handleEnd(code); }
165

Callers 2

processLineMethod · 0.95
onCloseMethod · 0.95

Calls 2

processLineMethod · 0.95
broadcastMethod · 0.95

Tested by

no test coverage detected