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

Function run

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

Source from the content-addressed store, hash-verified

101 const withConnection: McpConnectionPool["withConnection"] = (key, connector, use) => {
102 let reused = false;
103 const run = (forceFresh: boolean) =>
104 Effect.acquireUseRelease(
105 acquire(key, connector, forceFresh),
106 (lease) => {
107 if (!forceFresh) reused = lease.reused;
108 return use(lease.connection);
109 },
110 (lease, exit) => release(key, lease, exit),
111 );
112
113 return run(false).pipe(
114 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