Aias00 opened a new issue, #6888: URL: https://github.com/apache/shenyu/issues/6888
## Description `executeToolCall` subscribes fire-and-forget (`chain.execute(decoratedExchange).subscribe(...)` at line 266) then blocks on `responseFuture.get(DEFAULT_TIMEOUT_SECONDS, …)`. On `TimeoutException` it throws, but the `Disposable` returned by `subscribe()` is never captured/cancelled, and `doFinally` does not cancel the chain. The downstream request keeps running after the tool call has already returned an error to the MCP client. ## Location - `shenyu-plugin/shenyu-plugin-mcp-server/src/main/java/org/apache/shenyu/plugin/mcp/server/callback/ShenyuToolCallback.java:266-283` ## Impact Timed-out tool calls leak downstream work/connections and may produce side effects (e.g. upstream API calls) after the client has received an error. ## Suggested fix Capture the `Disposable`, and on `TimeoutException` call `disposable.dispose()` before throwing. ## Related existing None — distinct from MCP-01..05 (#6640-#6644, response decorator) and MCP-11 (notifications). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
