From e1c5b7e3c293770a21ea9654a558fd764efb76e4 Mon Sep 17 00:00:00 2001 From: theolivenbaum Date: Tue, 28 Jun 2022 15:40:58 +0200 Subject: [PATCH] Update main.js --- ElectronNET.Host/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ElectronNET.Host/main.js b/ElectronNET.Host/main.js index 6dbb507..e5101c0 100644 --- a/ElectronNET.Host/main.js +++ b/ElectronNET.Host/main.js @@ -285,7 +285,7 @@ function startSocketApiBridge(port) { io.on('connection', (socket) => { isConnected = true; - window.clearTimeout(checkReconnectTimeout); + clearTimeout(checkReconnectTimeout); socket.on('disconnect', function (reason) { try { console.log('Socket ' + socket.id + ' disconnected from .NET with reason: ' + reason); } catch { } @@ -299,10 +299,10 @@ function startSocketApiBridge(port) { try { console.error(error.message); } catch { } } - window.clearTimeout(checkReconnectTimeout); + clearTimeout(checkReconnectTimeout); //Give the server 60 seconds to reconnect, otherwise exits - checkReconnectTimeout = window.setTimeout((_) => { + checkReconnectTimeout = setTimeout((_) => { if (!isConnected) { app.exit(57005); //0xDEAD }