mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-19 08:28:10 +02:00
fix: fix anyio same task cancellation scope
This commit is contained in:
parent
3194ff1883
commit
97957db201
4 changed files with 31 additions and 13 deletions
|
|
@ -79,8 +79,12 @@ class McpToolSession:
|
|||
self.available: bool = False
|
||||
|
||||
async def start(self) -> None:
|
||||
"""Connect, initialize, and cache the tool list. Never raises —
|
||||
on any failure the session is marked unavailable."""
|
||||
"""Connect, initialize, and cache the tool list.
|
||||
|
||||
Never raises on a connect failure — a dead/unreachable MCP server
|
||||
leaves the session marked unavailable (``available = False``). Genuine
|
||||
external cancellation, KeyboardInterrupt, and SystemExit are re-raised
|
||||
(see the CancelledError handling below and ``_degrade``)."""
|
||||
try:
|
||||
params = build_streamable_http_params(
|
||||
url=self._url,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue