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

Function close

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

Source from the content-addressed store, hash-verified

120 };
121
122 const close = () =>
123 Effect.gen(function* () {
124 const connections = yield* Effect.sync(() => {
125 const connections = [...idle.values()].map((entry) => entry.connection);
126 idle.clear();
127 return connections;
128 });
129 yield* Effect.forEach(connections, closeQuietly, {
130 concurrency: "unbounded",
131 discard: true,
132 });
133 });
134
135 return { withConnection, close };
136};

Callers

nothing calls this directly

Calls 3

valuesMethod · 0.80
clearMethod · 0.80
syncMethod · 0.65

Tested by

no test coverage detected