Catch Runtime error while sending scan request
@@ -323,7 +323,10 @@ class HCIdump(Thread):
conn[hci], btctrl[hci] = self._event_loop.run_until_complete(fac[hci])
_LOGGER.debug("HCIdump thread: connected to hci%i", hci)
btctrl[hci].process = self.process_hci_events
+ try:
self._event_loop.run_until_complete(btctrl[hci].send_scan_request(self._active))
+ except RuntimeError as error:
+ _LOGGER.error("HCIdump thread: Runtime error while sending scan request: %s", error)
_LOGGER.debug("HCIdump thread: start main event_loop")
try:
self._event_loop.run_forever()
