MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / close

Function close

packages/plugins/mcp/src/sdk/connection-pool.ts:129–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127 };
128
129 const close = () =>
130 Effect.gen(function* () {
131 const connections = yield* Effect.sync(() => {
132 const connections = [...idle.values()].map((entry) => entry.connection);
133 idle.clear();
134 return connections;
135 });
136 yield* Effect.forEach(connections, closeQuietly, {
137 concurrency: "unbounded",
138 discard: true,
139 });
140 });
141
142 return { withConnection, close };
143};

Callers

nothing calls this directly

Calls 3

valuesMethod · 0.80
clearMethod · 0.80
syncMethod · 0.65

Tested by

no test coverage detected