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

@@ -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