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

Function run

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

Source from the content-addressed store, hash-verified

108 const withConnection: McpConnectionPool["withConnection"] = (key, connector, use) => {
109 let reused = false;
110 const run = (forceFresh: boolean) =>
111 Effect.acquireUseRelease(
112 acquire(key, connector, forceFresh),
113 (lease) => {
114 if (!forceFresh) reused = lease.reused;
115 return use(lease.connection);
116 },
117 (lease, exit) => release(key, lease, exit),
118 );
119
120 return run(false).pipe(
121 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