()
| 154 | } |
| 155 | |
| 156 | public handleClose() { |
| 157 | this.socket = null; |
| 158 | this.connectionPromise = null; |
| 159 | |
| 160 | if (this.routingMap.size > 0) { |
| 161 | const err = new Error('Connection closed'); |
| 162 | for (const callback of this.routingMap.values()) { |
| 163 | callback({ err }); |
| 164 | } |
| 165 | this.routingMap.clear(); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | public on< |
| 170 | EventKey extends keyof TcpEvents = keyof TcpEvents, |
no test coverage detected