Fix device tracker waiting forever when platform gets stuck
This commit is contained in:
1 parent
ec557f8d44
commit
c3fc19353b
1 file changed
+2
-1
@@ -157,7 +157,8 @@ class DeviceTracker(object):
|
||||
|
||||
def update_devices(self, now):
|
||||
""" Update device states based on the found devices. """
|
||||
self.lock.acquire()
|
||||
if not self.lock.acquire(False):
|
||||
return
|
||||
|
||||
found_devices = set(dev.upper() for dev in
|
||||
self.device_scanner.scan_devices())
|
||||
|
||||
Reference in new issue
Block a user