Add placeholder for minimux retries

Signed-off-by: Joseph Mattello <mail@joemattiello.com>
This commit is contained in:
Joseph Mattello
2023-01-04 12:20:08 -05:00
parent 32e58af896
commit 1ba51e161e
2 changed files with 40 additions and 0 deletions

View File

@@ -149,7 +149,17 @@ final class LaunchViewController: RSTLaunchViewController, UIDocumentPickerDeleg
func start_minimuxer_threads(_ pairing_file: String) {
set_usbmuxd_socket()
#if false // Retries
var res = start_minimuxer(pairing_file: pairing_file)
var attempts = 10
while (attempts != 0 && res != 0) {
print("start_minimuxer `res` != 0, retry #\(attempts)")
res = start_minimuxer(pairing_file: pairing_file)
attempts -= 1
}
#else
let res = start_minimuxer(pairing_file: pairing_file)
#endif
if res != 0 {
displayError("minimuxer failed to start. Incorrect arguments were passed.")
}