tchellomello / python-amcrest

A Python 2.7/3.x module for Amcrest and Dahua Cameras using the SDK HTTP API.
GNU General Public License v2.0
213 stars 76 forks source link

Improve event handling in async stream #213

Closed flacjacket closed 2 years ago

flacjacket commented 2 years ago

Previous changes were made to the async command to allow that to handle read timeouts better, and to correctly wrap all of the httpx exception types. Not all of these changes were correctly applied to the async stream command as well. This change correctly sets this error handling for all async commands. This has been tested for both normal and streaming async commands to ensure the proper wrapped exception type is applied in all cases.