From ef32f6f46688c3264723c89a3344a14801a28eaa Mon Sep 17 00:00:00 2001 From: Luciole <31817566+Luciole0x@users.noreply.github.com> Date: Mon, 14 Aug 2023 11:03:44 +0200 Subject: [PATCH] .closing > .connector.closing --- packages/controller/src/ControlConnection.ts | 4 ++-- packages/controller/src/HostConnection.ts | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/controller/src/ControlConnection.ts b/packages/controller/src/ControlConnection.ts index de7d303b..a0a8eae5 100644 --- a/packages/controller/src/ControlConnection.ts +++ b/packages/controller/src/ControlConnection.ts @@ -408,12 +408,12 @@ export default class ControlConnection extends BaseConnection { // Check connectivity let sourceHostConnection = this._controller.wsServer.hostConnections.get(sourceHostId); - if (!sourceHostConnection || sourceHostConnection.closing) { + if (!sourceHostConnection || sourceHostConnection.connector.closing) { throw new lib.RequestError("Source host is not connected to the controller"); } let targetHostConnection = this._controller.wsServer.hostConnections.get(targetHostId); - if (!targetHostConnection || targetHostConnection.closing) { + if (!targetHostConnection || targetHostConnection.connector.closing) { throw new lib.RequestError("Target host is not connected to the controller"); } diff --git a/packages/controller/src/HostConnection.ts b/packages/controller/src/HostConnection.ts index ad630579..6c21855f 100644 --- a/packages/controller/src/HostConnection.ts +++ b/packages/controller/src/HostConnection.ts @@ -30,7 +30,6 @@ export default class HostConnection extends BaseConnection { private _name: any; private _version: any; plugins: Map; - closing: boolean = false; constructor( registerData: any, @@ -65,8 +64,6 @@ export default class HostConnection extends BaseConnection { } this.connector.on("close", () => { - this.closing = true; - // Update status to unknown for instances on this host. for (let instance of this._controller.instances.values()) { if (instance.config.get("instance.assigned_host") !== this._id) {