Retry AFC 10 times before giving up

This commit is contained in:
Nythepegasus
2022-12-03 17:25:54 -05:00
committed by Joe Mattiello
parent d797ddd668
commit 7162a029bb

View File

@@ -51,7 +51,13 @@ class SendAppOperation: ResultOperation<()>
for (index, data) in data.enumerated() {
pls[index] = data
}
var attempts = 10
let res = minimuxer_yeet_app_afc(ns_bundle_ptr, pls, UInt(data.length))
while (attempts != 0 && res != 0){
print("minimuxer_yeet_app_afc `res` != 0, retry #\(attempts)")
let res = minimuxer_yeet_app_afc(ns_bundle_ptr, pls, UInt(data.length))
attempts -= 1
}
if res == 0 {
self.progress.completedUnitCount += 1
self.finish(.success(()))