1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-19 03:32:20 +01:00

fix, cover

This commit is contained in:
J. Nick Koston
2025-09-04 20:17:08 -05:00
parent 2d37518c00
commit 3fc928f5d1

View File

@@ -34,7 +34,9 @@ class AsyncResolver:
self.result = await hr.async_resolve_host(
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
finally:
self.event.set()