Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise timeout exception from async stream #211

Merged
merged 1 commit into from
Mar 13, 2022

Conversation

flacjacket
Copy link
Collaborator

Using httpx, the .stream method does not raise an exception when the
device goes offline if the read timeout is disabled. To get around this,
introduce a new exception that will be thrown if a timeout is hit so it
can more easily be handled and the stream reconnected as needed. Add
handling logic to the async_event_stream so it behaves like the
non-async method by retrying while read errors are thrown.

Using httpx, the `.stream` method does not raise an exception when the
device goes offline if the read timeout is disabled. To get around this,
introduce a new exception that will be thrown if a timeout is hit so it
can more easily be handled and the stream reconnected as needed.  Add
handling logic to the async_event_stream so it behaves like the
non-async method by retrying while read errors are thrown.
@flacjacket flacjacket merged commit a9654f3 into tchellomello:master Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant