()
| 164 | onClose(code) { if (this.running) this.handleEnd(code); } |
| 165 | |
| 166 | destroy() { |
| 167 | this.stream.removeListener("data", this.onData); |
| 168 | this.stream.removeListener("close", this.onClose); |
| 169 | for (const { ws, handler } of this.handlers) ws.removeListener("message", handler); |
| 170 | this.handlers.clear(); |
| 171 | this.running = false; |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | module.exports = { ScriptLayer, SCRIPT_MAGIC, MSG }; |
no outgoing calls
no test coverage detected