mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 16:23:12 +09:00
.closing > .connector.closing
This commit is contained in:
1 parent
23089aa1af
commit
ef32f6f466
2 files changed
+2
-5
No files matched your search
@@ -408,12 +408,12 @@ export default class ControlConnection extends BaseConnection {
|
|||||||
|
|
||||||
// Check connectivity
|
// Check connectivity
|
||||||
let sourceHostConnection = this._controller.wsServer.hostConnections.get(sourceHostId);
|
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");
|
throw new lib.RequestError("Source host is not connected to the controller");
|
||||||
}
|
}
|
||||||
|
|
||||||
let targetHostConnection = this._controller.wsServer.hostConnections.get(targetHostId);
|
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");
|
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 _name: any;
|
||||||
private _version: any;
|
private _version: any;
|
||||||
plugins: Map<string, Object>;
|
plugins: Map<string, Object>;
|
||||||
closing: boolean = false;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
registerData: any,
|
registerData: any,
|
||||||
@@ -65,8 +64,6 @@ export default class HostConnection extends BaseConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.connector.on("close", () => {
|
this.connector.on("close", () => {
|
||||||
this.closing = true;
|
|
||||||
|
|
||||||
// Update status to unknown for instances on this host.
|
// Update status to unknown for instances on this host.
|
||||||
for (let instance of this._controller.instances.values()) {
|
for (let instance of this._controller.instances.values()) {
|
||||||
if (instance.config.get("instance.assigned_host") !== this._id) {
|
if (instance.config.get("instance.assigned_host") !== this._id) {
|
||||||
|
|||||||
Reference in new issue
Block a user