.closing > .connector.closing

This commit is contained in:
Luciole committed 2023-08-14 11:03:44 +02:00
1 parent 23089aa1af
commit ef32f6f466
2 files changed
+2 -5

No files matched your search

+2 -2
View File
@@ -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");
}
@@ -30,7 +30,6 @@ export default class HostConnection extends BaseConnection {
private _name: any;
private _version: any;
plugins: Map<string, Object>;
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) {