1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 17:47:08 +00:00

Update will return after started, instead of waiting for exit.

This should prevent the update from re-running every 30 seconds when its failing.
This commit is contained in:
Mark McDowall 2013-08-18 16:43:13 -07:00
parent c9ec933d24
commit ab8b521b85
2 changed files with 1 additions and 11 deletions

View file

@ -71,7 +71,6 @@ public ProcessInfo GetProcessById(int id)
return processInfo;
}
public void OpenDefaultBrowser(string url)
{
Logger.Info("Opening URL [{0}]", url);
@ -154,8 +153,6 @@ public void WaitForExit(Process process)
process.WaitForExit();
}
public void SetPriority(int processId, ProcessPriorityClass priority)
{
var process = Process.GetProcessById(processId);
@ -178,7 +175,6 @@ public void KillAll(string processName)
}
}
private static ProcessInfo ConvertToProcessInfo(Process process)
{
if (process == null) return null;
@ -204,8 +200,6 @@ private static ProcessInfo ConvertToProcessInfo(Process process)
return null;
}
private void Kill(int processId)
{
var process = Process.GetProcesses().FirstOrDefault(p => p.Id == processId);

View file

@ -72,11 +72,7 @@ private void InstallUpdate(UpdatePackage updatePackage)
_logger.Info("Starting update client {0}", _appFolderInfo.GetUpdateClientExePath());
var process = _processProvider.Start(_appFolderInfo.GetUpdateClientExePath(), _processProvider.GetCurrentProcess().Id.ToString());
_processProvider.WaitForExit(process);
_logger.Error("Update process failed");
_processProvider.Start(_appFolderInfo.GetUpdateClientExePath(), _processProvider.GetCurrentProcess().Id.ToString());
}
catch (Exception ex)
{