Fix transport retries after close (#568)

This commit is contained in:
sdb9696
2023-12-05 14:56:29 +00:00
committed by GitHub
parent 4a00199506
commit 01f3827d73
3 changed files with 9 additions and 5 deletions

View File

@@ -88,6 +88,8 @@ class AesTransport(BaseTransport):
async def client_post(self, url, params=None, data=None, json=None, headers=None):
"""Send an http post request to the device."""
if not self._http_client:
self._http_client = httpx.AsyncClient()
response_data = None
cookies = None
if self._session_cookie: