mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-15 07:04:26 +10:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user