Skip to content

Commit 1f7fe6c

Browse files
committed
fix(mcp): pass abort signal through callBlocks auth recovery
1 parent b7e15c1 commit 1f7fe6c

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
@@ -613,12 +613,13 @@ async function finishClient(
613613
return envelope;
614614
},
615615
async callBlocks(toolName, args, signal) {
616-
const context =
617-
authContext === undefined ? undefined : { ...authContext, signal };
618-
const result = await withHTTPAuthorizationRecovery(context, () =>
619-
client.callTool({ name: toolName, arguments: args }, undefined, {
620-
signal,
621-
}),
616+
const result = await withHTTPAuthorizationRecovery(
617+
authContext,
618+
() =>
619+
client.callTool({ name: toolName, arguments: args }, undefined, {
620+
signal,
621+
}),
622+
signal,
622623
);
623624
return validateMcpContentBlocks(result.content);
624625
},

0 commit comments

Comments
 (0)