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

Function close

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

valuesMethod · 0.80
clearMethod · 0.80
syncMethod · 0.65

Tested by

no test coverage detected