(exitCode)
| 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 |
no test coverage detected