mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-11-05 23:21:56 +00:00
Update transport close/reset behaviour (#689)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
@@ -348,7 +348,12 @@ class KlapTransport(BaseTransport):
|
||||
return json_payload
|
||||
|
||||
async def close(self) -> None:
|
||||
"""Mark the handshake as not done since we likely lost the connection."""
|
||||
"""Close the http client and reset internal state."""
|
||||
await self.reset()
|
||||
await self._http_client.close()
|
||||
|
||||
async def reset(self) -> None:
|
||||
"""Reset internal handshake state."""
|
||||
self._handshake_done = False
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user