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);
|
LogManager.logStackTrace(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Analytics.endSession();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,6 +419,7 @@ public class Launcher {
|
||||||
.build())
|
.build())
|
||||||
.setType(DialogManager.ERROR).show();
|
.setType(DialogManager.ERROR).show();
|
||||||
OS.openWebBrowser("https://atlauncher.com/downloads");
|
OS.openWebBrowser("https://atlauncher.com/downloads");
|
||||||
|
Analytics.endSession();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1115,6 +1115,7 @@ public class Instance extends MinecraftVersion {
|
||||||
|
|
||||||
if ((App.autoLaunch != null && App.closeLauncher)
|
if ((App.autoLaunch != null && App.closeLauncher)
|
||||||
|| (!App.settings.keepLauncherOpen && !App.settings.enableLogs)) {
|
|| (!App.settings.keepLauncherOpen && !App.settings.enableLogs)) {
|
||||||
|
Analytics.endSession();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1297,6 +1298,7 @@ public class Instance extends MinecraftVersion {
|
||||||
FileUtils.delete(getCustomMinecraftJarLibraryPath());
|
FileUtils.delete(getCustomMinecraftJarLibraryPath());
|
||||||
}
|
}
|
||||||
if (!App.settings.keepLauncherOpen) {
|
if (!App.settings.keepLauncherOpen) {
|
||||||
|
Analytics.endSession();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
|
|
|
@ -243,6 +243,7 @@ public class Server {
|
||||||
.build())
|
.build())
|
||||||
.setType(DialogManager.INFO).show();
|
.setType(DialogManager.INFO).show();
|
||||||
} else {
|
} else {
|
||||||
|
Analytics.endSession();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
|
@ -30,6 +30,7 @@ import javax.swing.JWindow;
|
||||||
import org.mini2Dx.gettext.GetText;
|
import org.mini2Dx.gettext.GetText;
|
||||||
|
|
||||||
import com.atlauncher.App;
|
import com.atlauncher.App;
|
||||||
|
import com.atlauncher.network.Analytics;
|
||||||
import com.atlauncher.utils.Utils;
|
import com.atlauncher.utils.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -89,6 +90,7 @@ public class SplashScreen extends JWindow {
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Analytics.endSession();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
});
|
});
|
||||||
add(forceQuit);
|
add(forceQuit);
|
||||||
|
|
|
@ -110,6 +110,7 @@ public final class TrayMenu extends JPopupMenu implements ConsoleCloseListener,
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Analytics.endSession();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -519,6 +519,7 @@ public enum OS {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Analytics.endSession();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue