Update transport close/reset behaviour (#689)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Steven B
2024-01-23 22:15:18 +00:00
committed by GitHub
parent e576fcdb46
commit 1788c50146
13 changed files with 66 additions and 43 deletions

View File

@@ -315,10 +315,12 @@ class AesTransport(BaseTransport):
return await self.send_secure_passthrough(request)
async def close(self) -> None:
"""Mark the handshake and login as not done.
"""Close the http client and reset internal state."""
await self.reset()
await self._http_client.close()
Since we likely lost the connection.
"""
async def reset(self) -> None:
"""Reset internal handshake and login state."""
self._handshake_done = False
self._login_token = None