File tree 1 file changed +5
-2
lines changed
custom_components/ble_monitor
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -326,14 +326,17 @@ def run(self):
326
326
try :
327
327
self ._event_loop .run_until_complete (btctrl [hci ].send_scan_request (self ._active ))
328
328
except RuntimeError as error :
329
- _LOGGER .error ("HCIdump thread: Runtime error while sending scan request: %s" , error )
329
+ _LOGGER .error ("HCIdump thread: Runtime error while sending scan request on hci%i : %s" , hci , error )
330
330
_LOGGER .debug ("HCIdump thread: start main event_loop" )
331
331
try :
332
332
self ._event_loop .run_forever ()
333
333
finally :
334
334
_LOGGER .debug ("HCIdump thread: main event_loop stopped, finishing" )
335
335
for hci in self ._interfaces :
336
- self ._event_loop .run_until_complete (btctrl [hci ].stop_scan_request ())
336
+ try :
337
+ self ._event_loop .run_until_complete (btctrl [hci ].stop_scan_request ())
338
+ except RuntimeError as error :
339
+ _LOGGER .error ("HCIdump thread: Runtime error while stop scan request on hci%i: %s" , hci , error )
337
340
conn [hci ].close ()
338
341
self ._event_loop .run_until_complete (asyncio .sleep (0 ))
339
342
if self ._joining is True :
You can’t perform that action at this time.
0 commit comments