1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2025-12-06 00:13:33 +00:00

bugfix: update application stuck when "Show on system tray" is active

This commit is contained in:
Simon Schön
2022-06-08 18:29:12 +02:00
parent ca18e48453
commit cf67f540f3
2 changed files with 4 additions and 2 deletions

View File

@@ -679,7 +679,8 @@ namespace MeshCentralRouter
{
if (this.InvokeRequired) { this.Invoke(new MeshCentralServer.toolUpdateHandler(Meshcentral_onToolUpdate), url, hash, size, serverhash); return; }
UpdateForm f = new UpdateForm(url, hash, size, args, serverhash);
if (f.ShowDialog(this) == DialogResult.OK) { }
forceExit = true;
if (f.ShowDialog(this) != DialogResult.OK) { forceExit = !notifyIcon.Visible; }
}
private void Meshcentral_onLoginTokenChanged()

View File

@@ -140,7 +140,8 @@ namespace MeshCentralRouter
} else {
updateMessage(Translate.T(Properties.Resources.Updating), 0);
Process.Start(System.Reflection.Assembly.GetEntryAssembly().Location + ".update.exe", "-update:" + System.Reflection.Assembly.GetEntryAssembly().Location + " " + string.Join(" ", args));
Application.Exit();
if (this.InvokeRequired) { this.Invoke((MethodInvoker)delegate { Application.Exit(); }); } else { Application.Exit(); }
}
}
}