Skip to content

Commit

Permalink
reset device_fut when timeout is reached
Browse files Browse the repository at this point in the history
  • Loading branch information
thisiscam committed Dec 6, 2024
1 parent b2c6efd commit f8694ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion findmy/scanner/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@ async def scan_for(
yield device

time_left = stop_at - time.time()
except (asyncio.CancelledError, asyncio.TimeoutError): # timeout reached
except asyncio.TimeoutError: # timeout reached
self._device_fut = self._loop.create_future()
return
finally:
await self._stop_scan()

0 comments on commit f8694ba

Please sign in to comment.