mirror of
https://github.com/unraid/api.git
synced 2026-01-09 10:10:45 -06:00
fix: reconnect to internal relay on my_servers reload
This commit is contained in:
@@ -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
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user