From 998ff50495f2bb738588da6d760cd538bc3e2a3a Mon Sep 17 00:00:00 2001 From: Zach Date: Wed, 28 Jan 2026 21:34:13 -0700 Subject: [PATCH] fix: restore _handleDisconnection() on battery request failure This was the author's original intent - use battery request failure as a signal that the connection is lost. --- lib/connector/meshcore_connector.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index 191f74e..6f22c5e 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -962,9 +962,8 @@ class MeshCoreConnector extends ChangeNotifier { try { await sendFrame(buildGetBattAndStorageFrame()); } catch (e) { - // Reset flag on error to allow retry - // Don't disconnect on battery request failure - it may be transient - _batteryRequested = false; + // Connection likely lost - trigger disconnection handling + _handleDisconnection(); } }