feat: Reconnect to mqtt when connection is lost
Audit / cargo audit (push) Successful in 1m54s
Build and deploy / Deploy container (push) Canceled after 0s
Build and deploy / Build container and manifests (push) Canceled after 22m0s
Build and deploy / build (push) Canceled after 17m22s

This commit is contained in:
2026-08-26 05:45:43 +02:00
parent 64f3052b76
commit 75d1f0b641
+1
View File
@@ -26,6 +26,7 @@ impl From<MqttConfig> for MqttOptions {
let mut mqtt_options = MqttOptions::new(value.client_name, (value.host, value.port));
mqtt_options.set_credentials(value.username, value.password);
mqtt_options.set_keep_alive(5);
mqtt_options.set_session_mode(rumqttc::SessionMode::Persistent);
if value.tls {
mqtt_options.set_transport(Transport::tls_with_default_config());