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

Function destroy

packages/platform/node/src/NodeRedis.ts:69–77  ·  view source on GitHub ↗
(client: NodeRedisClient, abort?: AbortController)

Source from the content-addressed store, hash-verified

67// Destroying first leaves the abort only an untracked, still-connecting socket
68// to close, so it raises no client error.
69const destroy = (client: NodeRedisClient, abort?: AbortController) => {
70 try {
71 client.destroy()
72 } catch {
73 // node-redis before 6.3 throws when destroying a client whose connection
74 // has failed.
75 }
76 abort?.abort()
77}
78
79const make = Effect.fnUntraced(function*(
80 { acquireTimeout, idleTimeout, maxConnections, minConnections, ...options }: NodeRedisOptions = {}

Callers 1

NodeRedis.tsFile · 0.70

Calls 2

abortMethod · 0.65
destroyMethod · 0.45

Tested by

no test coverage detected