mirror of
https://github.com/esphome/esphome.git
synced 2025-09-19 11:42:20 +01:00
fix, cover
This commit is contained in:
@@ -34,7 +34,9 @@ class AsyncResolver:
|
|||||||
self.result = await hr.async_resolve_host(
|
self.result = await hr.async_resolve_host(
|
||||||
hosts, port, timeout=RESOLVE_TIMEOUT
|
hosts, port, timeout=RESOLVE_TIMEOUT
|
||||||
)
|
)
|
||||||
except (ResolveAPIError, ResolveTimeoutAPIError, OSError) as e:
|
except Exception as e: # pylint: disable=broad-except
|
||||||
|
# We need to catch all exceptions to ensure the event is set
|
||||||
|
# Otherwise the thread could hang forever
|
||||||
self.exception = e
|
self.exception = e
|
||||||
finally:
|
finally:
|
||||||
self.event.set()
|
self.event.set()
|
||||||
|
Reference in New Issue
Block a user