Skip to content

Conversation

@rmaher001
Copy link
Contributor

Summary

Moves timeout fix from request level (#501) to session level, which is more appropriate since the session is created specifically for the Dahua client.

Changes

  • Add timeout=ClientTimeout(total=None) to ClientSession creation in __init__.py
  • Revert request-level timeout fix from client.py

Rationale

The session-level fix prevents the default 5-minute timeout from disconnecting infinite event streams while keeping regular API requests properly scoped.

Testing

Tested in production with no timeout errors.

Moves timeout fix from request level (rroller#501) to session level, which is more appropriate since the session is created specifically for the Dahua client.

Changes:
- Add timeout=ClientTimeout(total=None) to ClientSession creation in __init__.py
- Revert request-level timeout fix from client.py

The session-level fix prevents the default 5-minute timeout from disconnecting infinite event streams while keeping regular API requests properly scoped.

Tested in production with no timeout errors.
@rroller rroller merged commit 696e662 into rroller:main Oct 6, 2025
2 of 3 checks passed
@rmaher001
Copy link
Contributor Author

rmaher001 commented Oct 6, 2025 via email

rroller added a commit that referenced this pull request Oct 10, 2025
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.

2 participants