mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-20 09:25:34 +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 {
|
try {
|
||||||
await sendFrame(buildGetBattAndStorageFrame());
|
await sendFrame(buildGetBattAndStorageFrame());
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Reset flag on error to allow retry
|
// Connection likely lost - trigger disconnection handling
|
||||||
// Don't disconnect on battery request failure - it may be transient
|
_handleDisconnection();
|
||||||
_batteryRequested = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user