File tree 3 files changed +5
-4
lines changed 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -97,9 +97,6 @@ def __init__(
97
97
self ._default_credentials : Credentials = get_default_credentials (
98
98
DEFAULT_CREDENTIALS ["TAPOCAMERA" ]
99
99
)
100
-
101
- if not config .timeout :
102
- config .timeout = self .DEFAULT_TIMEOUT
103
100
self ._http_client : HttpClient = HttpClient (config )
104
101
105
102
self ._state = TransportState .HANDSHAKE_REQUIRED
Original file line number Diff line number Diff line change @@ -89,6 +89,8 @@ async def post(
89
89
self ._last_url = url
90
90
self .client .cookie_jar .clear ()
91
91
return_json = bool (json )
92
+ if self ._config .timeout is None :
93
+ _LOGGER .warning ("Request timeout is set to None." )
92
94
client_timeout = aiohttp .ClientTimeout (total = self ._config .timeout )
93
95
94
96
# If json is not a dict send as data.
Original file line number Diff line number Diff line change @@ -91,7 +91,9 @@ def __init__(
91
91
self ._port = config .port_override or self .default_port
92
92
self ._credentials = config .credentials
93
93
self ._credentials_hash = config .credentials_hash
94
- self ._timeout = config .timeout or self .DEFAULT_TIMEOUT
94
+ if not config .timeout :
95
+ config .timeout = self .DEFAULT_TIMEOUT
96
+ self ._timeout = config .timeout
95
97
96
98
@property
97
99
@abstractmethod
You can’t perform that action at this time.
0 commit comments