Skip to content

Commit

Permalink
Add deadlock avoidance in nstallGameView by manually terminating op…
Browse files Browse the repository at this point in the history
…tional pack parser on view exit (fixes #140)
  • Loading branch information
vapidinfinity committed Aug 14, 2024
1 parent a8f78ce commit 8381d21
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Mythic/Views/Unified/Sheets/InstallGameView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct InstallViewEvo: View {

if output.stdout.contains("Installation requirements check returned the following results:") {
if let match = try? Regex(#"Failure: (.*)"#).firstMatch(in: output.stdout) {
Legendary.stopCommand(identifier: "install")
Legendary.stopCommand(identifier: "parseOptionalPacks")
installationError = Legendary.InstallationError(errorDescription: .init(match.last?.substring ?? "Unknown Error"))
isInstallationErrorPresented = true
return
Expand Down Expand Up @@ -76,6 +76,9 @@ struct InstallViewEvo: View {
}
)
}
.onDisappear {
Legendary.stopCommand(identifier: "parseOptionalPacks")
}

if operation.current != nil {
Text("Cannot fetch selected downloads while other items are downloading.")
Expand Down

0 comments on commit 8381d21

Please sign in to comment.