mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Handle mqtt.WebsocketConnectionError when connecting to the MQTT broker (#133610)
fixes #132985
This commit is contained in:
@ -661,7 +661,7 @@ class MQTT:
|
||||
self.conf.get(CONF_PORT, DEFAULT_PORT),
|
||||
self.conf.get(CONF_KEEPALIVE, DEFAULT_KEEPALIVE),
|
||||
)
|
||||
except OSError as err:
|
||||
except (OSError, mqtt.WebsocketConnectionError) as err:
|
||||
_LOGGER.error("Failed to connect to MQTT server due to exception: %s", err)
|
||||
self._async_connection_result(False)
|
||||
finally:
|
||||
|
Reference in New Issue
Block a user