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:
Hornwitser committed 2020-04-09 19:50:01 +02:00
1 parent 47ea8f5477
commit 9507608e59
8 files changed
+174 -44

No files matched your search

+1 -2
View File
@@ -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();
}
}