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

Function cleanup

packages/sql/pg/src/PgClient.ts:312–316  ·  view source on GitHub ↗
(cause?: Error)

Source from the content-addressed store, hash-verified

310 resume(Effect.fail(new SqlError({ reason: classifyError(cause, "Connection error", "acquireConnection") })))
311 }
312 function cleanup(cause?: Error) {
313 if (!done) client?.release(cause)
314 done = true
315 client?.off("error", onError)
316 }
317 pool.connect((cause, client_) => {
318 if (cause) {
319 return resume(

Callers 7

onErrorFunction · 0.70
makeConectionFunction · 0.70
vitest.setup.tsFile · 0.50
vitest.setup.tsFile · 0.50
onFailureMethod · 0.50
onOpenMethod · 0.50
upgradeMethod · 0.50

Calls 1

releaseMethod · 0.65

Tested by

no test coverage detected