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.
This commit is contained in:
Zach 2026-01-28 21:34:13 -07:00
parent 92d2b224e7
commit 998ff50495

View file

@ -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();
}
}