mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-09-21 22:45:20 +00:00
Update main.js
This commit is contained in:
@@ -246,7 +246,7 @@ function startSocketApiBridge(port) {
|
||||
io.on('connection', (socket) => {
|
||||
|
||||
socket.on('disconnect', function (reason) {
|
||||
console.log('Got disconnect! Reason: ' + reason);
|
||||
console.log('Socket with .NET disconnect with reason: ' + reason);
|
||||
try {
|
||||
if (hostHook) {
|
||||
const hostHookScriptFilePath = path.join(__dirname, 'ElectronHostHook', 'index.js');
|
||||
@@ -404,6 +404,11 @@ function startAspCoreBackend(electronPort) {
|
||||
console.log(`Will quit Electron, as exit code != 0 (got ${code})`);
|
||||
app.exit(code);
|
||||
}
|
||||
else if (os.platform() === 'darwin' && ignoreApiProcessClosed) {
|
||||
//There is a bug on the updater on macOS never quiting and starting the update process
|
||||
//We give Squirrel.Mac enough time to access the update file, and then just force-exit here
|
||||
setTimeout(() => app.exit(0), 10_000);
|
||||
}
|
||||
});
|
||||
|
||||
if (detachedProcess) {
|
||||
|
||||
Reference in New Issue
Block a user