fix: reset passwordIndex in readConfig() to prevent stale auth state
Without this reset, if provision() was called first and incremented passwordIndex, a subsequent readConfig() call would start at the wrong password index and potentially skip the correct password entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ee366870ea
commit
06b258ac18
1 changed files with 1 additions and 0 deletions
|
|
@ -253,6 +253,7 @@ class BeaconProvisioner: NSObject, ObservableObject {
|
||||||
self.operationMode = .readingConfig
|
self.operationMode = .readingConfig
|
||||||
self.readCompletion = completion
|
self.readCompletion = completion
|
||||||
self.readResult = BeaconCheckResult()
|
self.readResult = BeaconCheckResult()
|
||||||
|
self.passwordIndex = 0
|
||||||
self.characteristics.removeAll()
|
self.characteristics.removeAll()
|
||||||
self.dxSmartAuthenticated = false
|
self.dxSmartAuthenticated = false
|
||||||
self.dxSmartNotifySubscribed = false
|
self.dxSmartNotifySubscribed = false
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue