mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-01 06:30:31 +10:00
fix: address PR review issues
- Fix memory leak by adding dispose() to remove connection listener - Fix typo: changedNavgation -> _changedNavigation - Add mounted check before navigation to prevent errors - Remove overly aggressive _handleDisconnection() call on battery request failure - Only reset battery flag on error to allow retry without disconnecting
This commit is contained in:
@@ -963,7 +963,7 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
await sendFrame(buildGetBattAndStorageFrame());
|
||||
} catch (e) {
|
||||
// Reset flag on error to allow retry
|
||||
_handleDisconnection();
|
||||
// Don't disconnect on battery request failure - it may be transient
|
||||
_batteryRequested = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user