mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
exit sandbox instead of asking to quit
This commit is contained in:
parent
614956a86b
commit
e1ed7929e3
1 changed files with 8 additions and 6 deletions
|
@ -163,17 +163,19 @@ function shutdownCallback(idx) {
|
|||
if (homeServer.state == ProcessGroupStates.STOPPED) {
|
||||
// if the home server is already down, take down the server console now
|
||||
log.debug("Quitting.");
|
||||
app.quit();
|
||||
app.exit(0);
|
||||
} else {
|
||||
// if the home server is still running, wait until we get a state change or timeout
|
||||
// before quitting the app
|
||||
log.debug("Server still shutting down. Waiting");
|
||||
var timeoutID = setTimeout(app.quit, 5000);
|
||||
var timeoutID = setTimeout(function() {
|
||||
app.exit(0);
|
||||
}, 5000);
|
||||
homeServer.on('state-update', function(processGroup) {
|
||||
if (processGroup.state == ProcessGroupStates.STOPPED) {
|
||||
clearTimeout(timeoutID);
|
||||
log.debug("Quitting.");
|
||||
app.quit();
|
||||
app.exit(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -240,7 +242,7 @@ var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory)
|
|||
|
||||
if (shouldQuit) {
|
||||
log.warn("Another instance of the Sandbox is already running - this instance will quit.");
|
||||
app.quit();
|
||||
app.exit(0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -288,12 +290,12 @@ function binaryMissingMessage(displayName, executableName, required) {
|
|||
|
||||
if (!dsPath) {
|
||||
dialog.showErrorBox("Domain Server Not Found", binaryMissingMessage("domain-server", "domain-server", true));
|
||||
app.quit();
|
||||
app.exit(0);
|
||||
}
|
||||
|
||||
if (!acPath) {
|
||||
dialog.showErrorBox("Assignment Client Not Found", binaryMissingMessage("assignment-client", "assignment-client", true));
|
||||
app.quit();
|
||||
app.exit(0);
|
||||
}
|
||||
|
||||
function openFileBrowser(path) {
|
||||
|
|
Loading…
Reference in a new issue