Skip to content

Commit 94c3392

Browse files
committed
fix(mcp): pass abort signal through callBlocks auth recovery
1 parent 5b3fe0a commit 94c3392

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎src/mcp/client.ts‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,13 @@ async function finishClient(
567567
serverName,
568568
tools,
569569
async callBlocks(toolName, args, signal) {
570-
const context =
571-
authContext === undefined ? undefined : { ...authContext, signal };
572-
const result = await withHTTPAuthorizationRecovery(context, () =>
573-
client.callTool({ name: toolName, arguments: args }, undefined, {
574-
signal,
575-
}),
570+
const result = await withHTTPAuthorizationRecovery(
571+
authContext,
572+
() =>
573+
client.callTool({ name: toolName, arguments: args }, undefined, {
574+
signal,
575+
}),
576+
signal,
576577
);
577578
return validateMcpContentBlocks(result.content);
578579
},

0 commit comments

Comments
 (0)