-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise timeout exception from async stream
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.
- Loading branch information
1 parent
0f91f6e
commit 4cbc74a
Showing
3 changed files
with
31 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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