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

Function close

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

Source from the content-addressed store, hash-verified

176 };
177
178 const close = () =>
179 Effect.gen(function* () {
180 const connections = yield* Effect.sync(() => {
181 const connections = [...idle.values()].map((entry) => entry.connection);
182 idle.clear();
183 return connections;
184 });
185 yield* Effect.forEach(connections, closeQuietly, {
186 concurrency: "unbounded",
187 discard: true,
188 });
189 });
190
191 return { withConnection, close };
192};

Callers

nothing calls this directly

Calls 3

valuesMethod · 0.80
clearMethod · 0.80
syncMethod · 0.65

Tested by

no test coverage detected