mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 08:23:12 +09:00
Rework disconnect logic for connectors
Rework the way disconnection at shutdown is done to properly close the connections when the master server is shut down.
This commit is contained in:
1 parent
47ea8f5477
commit
9507608e59
8 files changed
+174
-44
No files matched your search
+1
-2
@@ -45,7 +45,7 @@ class Link {
|
||||
connector.on("invalidate", () => {
|
||||
for (let waiterType of this._waiters.values()) {
|
||||
for (let waiter of waiterType) {
|
||||
waiter.reject(new Error("Session lost"));
|
||||
waiter.reject(new errors.SessionLost("Session Lost"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +224,6 @@ class Link {
|
||||
}
|
||||
|
||||
await Promise.all(promises);
|
||||
this.connector.setClosing();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user