Skip to content

Commit fe6a6f5

Browse files
committed
Replace asyncio.wait_for with asyncio.timeout
Fallback to using async_timeout on older python asyncio.wait_for has some underlying problems that are only fixed in cpython 3.12. See python/cpython#98518
1 parent dae93fd commit fe6a6f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kasa/protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ async def _query(self, request: str, retry_count: int, timeout: int) -> Dict:
165165
assert self.reader is not None
166166
assert self.writer is not None
167167
async with asyncio_timeout(timeout):
168-
await self._execute_query(request)
168+
return await self._execute_query(request)
169169
except Exception as ex:
170170
await self.close()
171171
if retry >= retry_count:

0 commit comments

Comments
 (0)