Added additional code to prevent the tray-icon from re-spawning after clicking "quit".

This commit is contained in:
Kenneth Skovhede
2017-06-27 15:05:46 +02:00
parent c5c0c1eb27
commit ac151bb567
@@ -210,6 +210,9 @@ namespace Duplicati.GUI.TrayIcon
// If the server shuts down, shut down the tray-icon as well
Action shutdownEvent = () =>
{
// Make sure we do not start again after
// a controlled exit
reSpawn = 100;
tk.InvokeExit();
};
@@ -218,6 +221,9 @@ namespace Duplicati.GUI.TrayIcon
tk.Init(_args);
// If the tray-icon quits, stop the server
reSpawn = 100;
// Make sure that the server shutdown does not access the tray-icon,
// as it would be disposed by now
if (hosted != null)