mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 07:04:52 +09:00
Fix crash on hartbeat on closing connection
Fix heartbeat incorrectly asserting it cannot be sent on a connection in the closing state.
This commit is contained in:
1 parent
b151dd8469
commit
1beffb1bfd
1 file changed
+1
-1
@@ -43,7 +43,7 @@ class WebSocketBaseConnector extends events.EventEmitter {
|
||||
}
|
||||
|
||||
_doHeartbeat() {
|
||||
this._check(["connected"]);
|
||||
this._check(["connected", "closing"]);
|
||||
if (Date.now() - this._lastHeartbeat > 2000 * this._heartbeatInterval) {
|
||||
console.log("SOCKET | closing after heartbeat timed out");
|
||||
this._socket.close(1008, "Heartbeat timeout");
|
||||
|
||||
Reference in new issue
Block a user