10000 Replace asyncio.wait_for with asyncio.timeout · bdraco/python-kasa@f0630f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit f0630f5

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 f8335d3 commit f0630f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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 a 4257 s ex:
170170
await self.close()
171171
if retry >= retry_count:

0 commit comments

Comments
 (0)
0