Skip to content

Commit

Permalink
Merge pull request #92 from thisiscam/fix_scanner_future
Browse files Browse the repository at this point in the history
reset device_fut when timeout is reached
  • Loading branch information
malmeloo authored Dec 23, 2024
2 parents a353b15 + f8694ba commit 889f689
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 889f689

Please # to comment.