mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-04-08 18:35:09 +02:00
Update will have it's own timeout check for safety reasons
This commit is contained in:
parent
5c03804407
commit
17c9a37a4d
@ -92,23 +92,28 @@ Public Class MainMenuScreen
|
||||
Logger.Debug("---Check Version---")
|
||||
|
||||
If Not Core.GameOptions.UpdateDisabled AndAlso My.Computer.Network.IsAvailable Then
|
||||
Task.Factory.StartNew(Sub()
|
||||
Dim Updater As New Process()
|
||||
Updater.StartInfo = New ProcessStartInfo("Updater.exe")
|
||||
Updater.Start()
|
||||
Updater.WaitForExit()
|
||||
|
||||
If Updater.ExitCode = 1 Then
|
||||
Core.GameInstance.Exit()
|
||||
Else
|
||||
GameController.UpdateChecked = True
|
||||
End If
|
||||
End Sub)
|
||||
WaitForUpdaterAsync()
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
Private Async Function WaitForUpdaterAsync() As Task
|
||||
Dim updater As New Process()
|
||||
updater.StartInfo = New ProcessStartInfo("Updater.exe")
|
||||
updater.Start()
|
||||
|
||||
Await Task.Delay(5000)
|
||||
If Not updater.HasExited Then
|
||||
updater.Kill()
|
||||
End If
|
||||
|
||||
If updater.ExitCode = 1 Then
|
||||
Core.GameInstance.Exit()
|
||||
Else
|
||||
GameController.UpdateChecked = True
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub GetPacks(Optional ByVal reload As Boolean = False)
|
||||
PackNames.Clear()
|
||||
|
Loading…
x
Reference in New Issue
Block a user