From 4eaf0a472a06e9d4c176ed41265cdcf65ffbccb7 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Tue, 1 Jun 2021 23:03:53 +0930 Subject: [PATCH] fix: reconnect to internal relay on my_servers reload --- app/core/watchers/myservers.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/app/core/watchers/myservers.ts b/app/core/watchers/myservers.ts index b4482de34..6ca384fa7 100644 --- a/app/core/watchers/myservers.ts +++ b/app/core/watchers/myservers.ts @@ -70,21 +70,13 @@ export const myservers = () => { mothership.connect(); coreLogger.debug('Reconnecting mothership\'s subscription endpoint.'); + // Reconnect to internal graph + await sockets.get('internalGraphql')?.connect(); + coreLogger.debug('Reconnecting the internal relay.'); + // Reconnect to relay await sockets.get('relay')?.connect(); coreLogger.debug('Reconnecting mothership\'s relay.'); - - // Reregister all subscriptions - // @ts-expect-error - Object.keys(mothership.operations).forEach(id => { - mothership.sendMessage( - id, - // @ts-expect-error - MessageTypes.GQL_START, - // @ts-expect-error - mothership.operations[id].options - ); - }); } });