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

Function run

packages/plugins/mcp/src/sdk/connection-pool.ts:159–167  ·  view source on GitHub ↗
(forceFresh: boolean)

Source from the content-addressed store, hash-verified

157 const withConnection: McpConnectionPool["withConnection"] = (key, connector, use) => {
158 let reused = false;
159 const run = (forceFresh: boolean) =>
160 Effect.acquireUseRelease(
161 acquire(key, connector, forceFresh),
162 (lease) => {
163 if (!forceFresh) reused = lease.reused;
164 return use(lease.connection);
165 },
166 (lease, exit) => release(key, lease, exit),
167 );
168
169 return run(false).pipe(
170 Effect.catch((error) =>

Callers 1

withConnectionFunction · 0.70

Calls 3

acquireFunction · 0.85
releaseFunction · 0.85
useFunction · 0.70

Tested by

no test coverage detected