Skip to content

Commit

Permalink
🚧 (WIP): Try to fix hanging
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Sep 29, 2023
1 parent 281afc1 commit 6478f64
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ private class StateVerifyingFile: GKState, StateEventProcessor {
private var cancellables: Set<AnyCancellable> = []

private var isFileValid = false
private let kDefaultValue = "0000000000000000000000000000000000000000000000000000000000000000"
private var lastValue = "0000000000000000000000000000000000000000000000000000000000000000"

private var nextStateIsClearingFile = false
Expand Down Expand Up @@ -371,10 +372,17 @@ private class StateVerifyingFile: GKState, StateEventProcessor {
return
}

if value == self.lastValue {
if value == self.kDefaultValue {
print("🔵 StateVerifyingFile - subscribeActualSHA256Updates - 3")
self.process(event: .fileVerificationReceived)
return
}

if value == self.lastValue {
print("🔵 StateVerifyingFile - subscribeActualSHA256Updates - 4")
return
}

self.lastValue = value

self.isFileValid = value == globalFirmwareManager.sha256
Expand Down

0 comments on commit 6478f64

Please sign in to comment.