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

Function onClose

packages/platform/node-shared/src/NodeSocket.ts:183–192  ·  view source on GitHub ↗
(hadError: boolean)

Source from the content-addressed store, hash-verified

181 )
182 }
183 function onClose(hadError: boolean) {
184 Deferred.doneUnsafe(
185 fiberSet.deferred,
186 Effect.fail(
187 new Socket.SocketError({
188 reason: new Socket.SocketCloseError({ code: hadError ? 1006 : 1000 })
189 })
190 )
191 )
192 }
193 })).pipe(
194 Effect.updateContext((input: Context.Context<R>) => Context.merge(openServices, input)),
195 Effect.onExit(() =>

Callers 1

closeFunction · 0.50

Calls 1

failMethod · 0.45

Tested by 1

closeFunction · 0.40