Skip to content

Commit f1f34d6

Browse files
committed
propagate CancelledError immediately
1 parent 5b1ced8 commit f1f34d6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mcp_agent/cli/utils/retry.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ async def retry_async_with_exponential_backoff(
135135
except Exception as e:
136136
last_exception = e
137137

138+
if isinstance(e, asyncio.CancelledError):
139+
raise
140+
138141
if attempt == max_attempts or not retryable_check(e):
139142
break
140143

0 commit comments

Comments
 (0)