MCPcopy Create free account
hub / github.com/Effect-TS/effect / onClose

Function onClose

packages/effect/src/socket/Socket.ts:1103–1105  ·  view source on GitHub ↗
(event: WebSocketEvent)

Source from the content-addressed store, hash-verified

1101 )
1102 }
1103 function onClose(event: WebSocketEvent) {
1104 fail(closeError(typeof event.code === "number" ? event.code : 1006, event.reason))
1105 }
1106
1107 ws.addEventListener("message", onMessage)
1108 ws.addEventListener("error", onError, { once: true })

Callers

nothing calls this directly

Calls 2

closeErrorFunction · 0.85
failFunction · 0.70

Tested by

no test coverage detected