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

Function finish

packages/sql/pg/src/PgConnection.ts:2384–2390  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2382 let socket: Duplex
2383 let timer: ReturnType<typeof setTimeout> | undefined
2384 const finish = (): void => {
2385 if (done) return
2386 done = true
2387 if (timer !== undefined) clearTimeout(timer)
2388 socket?.destroy()
2389 resume(Effect.void)
2390 }
2391 const frame = PgProtocol.encodeCancelRequest({ pid: session.processId, secret: session.secretKey })
2392 // After the frame is written the server processes the request and closes
2393 // the connection, which lands in the `close` handler.

Callers 4

beginFunction · 0.70
onKilledMethod · 0.50
ActiveStatementClass · 0.50
releaseCloseFunction · 0.50

Calls 2

resumeFunction · 0.50
destroyMethod · 0.45

Tested by 1

releaseCloseFunction · 0.40