Matthias Nott
9 days ago e0606b33f1912bd0ce3d9257db7d9ec9ed0c23cf
lib/services/mqtt_service.dart
....@@ -440,7 +440,9 @@
440440 );
441441 _mqttLog('MQTT: connect result=${result?.state}');
442442 if (result?.state == MqttConnectionState.connected) {
443
- client.autoReconnect = true; // Now enable auto-reconnect for the live connection
443
+ // Don't enable autoReconnect — we handle reconnection ourselves
444
+ // in didChangeAppLifecycleState(resumed). The library's autoReconnect
445
+ // competes with our force-reconnect and causes connection flickering.
444446 return true;
445447 }
446448 _client = null;