| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Add proper error handling avoiding cancellation of the whole task group
|
Hey @slykar, I implemented your fix with the CI issues resolved in #2282. The key differences from your version:
Feel free to take a look. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Motivation and Context
StreamableHTTPTransport is not handling connection/request errors properly, which leads to cancellation of the whole anyio.TaskGroup.
The fix should make connection/setup failures behave like normal request errors instead of letting them tear down the transport task group in a way that triggers cancellation churn.
Without the fix, a request collapses into an infinite AnyIO cancellation retry loop which may cause a sustained high CPU use.
How Has This Been Tested?
I was primarily testing this with Agno and FastMCP. There are some changes I had to make to Agno itself as well.
Here's how I've tested it:
Breaking Changes
No code changes or configuration is needed.
Types of changes
Checklist
Additional context