build: harden controller v2 runtime
This commit is contained in:
@@ -141,7 +141,9 @@ class MqttAdapter:
|
||||
self.config.mqtt.port,
|
||||
keepalive=self.config.mqtt.keepalive_seconds,
|
||||
)
|
||||
if result != mqtt.MQTT_ERR_SUCCESS:
|
||||
# Paho 2.x returns None after configuring an asynchronous connect;
|
||||
# older/test clients may return MQTT_ERR_SUCCESS.
|
||||
if result not in (None, mqtt.MQTT_ERR_SUCCESS):
|
||||
raise RuntimeError(f"failed to configure MQTT connection: {result}")
|
||||
with self._lifecycle_lock:
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user