From 43f54436319ed358d2f051f16669cd31e329de53 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 22 Jan 2024 21:39:43 -1000 Subject: [PATCH] Do not close out the session on connection error The P100s drop the connection after every request --- kasa/smartprotocol.py | 1 - 1 file changed, 1 deletion(-) diff --git a/kasa/smartprotocol.py b/kasa/smartprotocol.py index c28db948e..ecce5eecd 100644 --- a/kasa/smartprotocol.py +++ b/kasa/smartprotocol.py @@ -66,7 +66,6 @@ async def _query(self, request: Union[str, Dict], retry_count: int = 3) -> Dict: try: return await self._execute_query(request, retry) except ConnectionException as sdex: - await self.close() if retry >= retry_count: _LOGGER.debug("Giving up on %s after %s retries", self._host, retry) raise sdex