(handler, code, reason, cause)
| 15280 | } |
| 15281 | __name(closeWebSocketConnection, "closeWebSocketConnection"); |
| 15282 | function failWebsocketConnection(handler, code, reason, cause) { |
| 15283 | if (isEstablished(handler.readyState)) { |
| 15284 | closeWebSocketConnection(handler, code, reason, false); |
| 15285 | } |
| 15286 | handler.controller.abort(); |
| 15287 | if (isConnecting(handler.readyState)) { |
| 15288 | handler.onSocketClose(); |
| 15289 | } else if (handler.socket?.destroyed === false) { |
| 15290 | handler.socket.destroy(); |
| 15291 | } |
| 15292 | } |
| 15293 | __name(failWebsocketConnection, "failWebsocketConnection"); |
| 15294 | module2.exports = { |
| 15295 | establishWebSocketConnection, |
no test coverage detected
searching dependent graphs…