mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-04-20 22:13:48 +00: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:
parent
92d2b224e7
commit
998ff50495
1 changed files with 2 additions and 3 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue