mirror of
https://github.com/unraid/api.git
synced 2026-05-21 16:38:28 -05:00
fix: when relay drops reconnect internally
This commit is contained in:
@@ -7,6 +7,7 @@ import { AppError } from '../../core/errors';
|
||||
import { readFileIfExists } from '../utils';
|
||||
import { CustomSocket, WebSocketWithHeartBeat } from '../custom-socket';
|
||||
import packageJson from '../../../package.json';
|
||||
import { sockets } from '../../sockets';
|
||||
|
||||
export class MothershipSocket extends CustomSocket {
|
||||
private mothershipServersEndpoint?: {
|
||||
@@ -49,6 +50,10 @@ export class MothershipSocket extends CustomSocket {
|
||||
// Close connection to motherships's server's endpoint
|
||||
await this.disconnectFromMothershipsGraphql();
|
||||
|
||||
// Close connection to internal graphql
|
||||
const internalGraphqlClient = sockets.get('internalGraphql');
|
||||
await internalGraphqlClient?.disconnect();
|
||||
|
||||
// Process disconnection
|
||||
await onDisconnect(code, message);
|
||||
} catch (error: unknown) {
|
||||
|
||||
Reference in New Issue
Block a user