From 669850067eed1ccc95ac570c4f9b80313ccd1898 Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 14 Sep 2021 15:45:27 +0930 Subject: [PATCH] fix: use internal method for reconnection --- app/index.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/index.ts b/app/index.ts index 7b6d88a56..a5c2b3ca6 100644 --- a/app/index.ts +++ b/app/index.ts @@ -137,14 +137,9 @@ am(async () => { // Wait for internal to close await sleep(1_000); - // Ensure we reconnect relay once internal is up - sockets.internal?.once('connected', () => { - // Let's reconnect relay - sockets.relay?.start(); - }); - - // Reconnect internal - sockets.internal?.start(); + // Start internal as we do on a clean start + // This will take care of connecting to relay + startInternal(newApiKey); coreLogger.debug('Connecting to mothership\'s subscription endpoint.');