Commit 696e662
authored
Fix event stream timeout at session level (#508)
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
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.1 parent 2427d07 commit 696e662
2 files changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
| 762 | + | |
766 | 763 | | |
767 | 764 | | |
768 | 765 | | |
769 | 766 | | |
770 | 767 | | |
771 | | - | |
772 | | - | |
773 | | - | |
| 768 | + | |
774 | 769 | | |
775 | 770 | | |
776 | 771 | | |
| |||
0 commit comments