Repository navigation
fix(sse): the server's own error event ends the stream - #296
Merged
Merged
Conversation
A stream answered with `event: error` was reopened without limit, since the event counted as progress; a caller with no timeout never got a verdict.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The server's own
errorevent ends an operation stream. Before, the event counted as progress and reset the reconnect budget, so a stream the server answered withevent: error(the per-user connection cap, a stream it refuses) was reopened without limit, and amonitor_operationcall with no timeout never returned a verdict. The TypeScript client already treats the event as final.Changes
robosystems_client/clients/sse_client.py:SSEClientandAsyncSSEClientclose on the server'serrorevent, as they do on the operation's own terminal events. The event is still delivered toerrorlisteners first.tests/test_sse_client.py: one connect, the error delivered, no reconnect, for both clients.Breaking Changes
None. A patch release.
Testing
just test-allequivalent locally: ruff, format, basedpyright clean; 750 passed.🤖 Generated with Claude Code