()
| 137 | }; |
| 138 | |
| 139 | private teardown() { |
| 140 | if (this.socket) { |
| 141 | this.socket.removeEventListener('open', this.onOpen); |
| 142 | this.socket.removeEventListener('message', this.onMessage); |
| 143 | this.socket.removeEventListener('close', this.onClose); |
| 144 | this.socket.removeEventListener('error', this.onError); |
| 145 | } |
| 146 | |
| 147 | this.socket = null; |
| 148 | } |
| 149 | } |