fix: explicitely end session when using System.exit
This commit is contained in:
parent
cf86c50d60
commit
6009e81197
6 changed files with 9 additions and 0 deletions
|
@ -247,6 +247,7 @@ public class Launcher {
|
|||
LogManager.logStackTrace(e);
|
||||
}
|
||||
|
||||
Analytics.endSession();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
|
@ -418,6 +419,7 @@ public class Launcher {
|
|||
.build())
|
||||
.setType(DialogManager.ERROR).show();
|
||||
OS.openWebBrowser("https://atlauncher.com/downloads");
|
||||
Analytics.endSession();
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1115,6 +1115,7 @@ public class Instance extends MinecraftVersion {
|
|||
|
||||
if ((App.autoLaunch != null && App.closeLauncher)
|
||||
|| (!App.settings.keepLauncherOpen && !App.settings.enableLogs)) {
|
||||
Analytics.endSession();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
|
@ -1297,6 +1298,7 @@ public class Instance extends MinecraftVersion {
|
|||
FileUtils.delete(getCustomMinecraftJarLibraryPath());
|
||||
}
|
||||
if (!App.settings.keepLauncherOpen) {
|
||||
Analytics.endSession();
|
||||
System.exit(0);
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
|
|
|
@ -243,6 +243,7 @@ public class Server {
|
|||
.build())
|
||||
.setType(DialogManager.INFO).show();
|
||||
} else {
|
||||
Analytics.endSession();
|
||||
System.exit(0);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
|
|
@ -30,6 +30,7 @@ import javax.swing.JWindow;
|
|||
import org.mini2Dx.gettext.GetText;
|
||||
|
||||
import com.atlauncher.App;
|
||||
import com.atlauncher.network.Analytics;
|
||||
import com.atlauncher.utils.Utils;
|
||||
|
||||
/**
|
||||
|
@ -89,6 +90,7 @@ public class SplashScreen extends JWindow {
|
|||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
Analytics.endSession();
|
||||
System.exit(0);
|
||||
});
|
||||
add(forceQuit);
|
||||
|
|
|
@ -110,6 +110,7 @@ public final class TrayMenu extends JPopupMenu implements ConsoleCloseListener,
|
|||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
Analytics.endSession();
|
||||
System.exit(0);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -519,6 +519,7 @@ public enum OS {
|
|||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Analytics.endSession();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue