fix: zombie connection

This commit is contained in:
MARCROCK22 2025-03-12 23:35:37 -04:00
parent 2cf182f37e
commit dd0a3bf65b

View File

@ -210,7 +210,7 @@ export class Shard {
); );
if (!requested) { if (!requested) {
if (!this.heart.ack) { if (!this.heart.ack) {
this.close(ShardSocketCloseCodes.ZombiedConnection, 'Zombied connection'); this.reconnect(ShardSocketCloseCodes.ZombiedConnection);
return; return;
} }
this.heart.ack = false; this.heart.ack = false;
@ -424,6 +424,7 @@ export class Shard {
case ShardSocketCloseCodes.Reconnect: case ShardSocketCloseCodes.Reconnect:
case ShardSocketCloseCodes.Resharding: case ShardSocketCloseCodes.Resharding:
case ShardSocketCloseCodes.ShutdownAll: case ShardSocketCloseCodes.ShutdownAll:
case ShardSocketCloseCodes.ZombiedConnection:
//Force disconnect, ignore //Force disconnect, ignore
break; break;
case 1000: case 1000:
@ -441,7 +442,6 @@ export class Shard {
break; break;
case 1001: case 1001:
case 1006: case 1006:
case ShardSocketCloseCodes.ZombiedConnection:
case GatewayCloseCodes.UnknownError: case GatewayCloseCodes.UnknownError:
case GatewayCloseCodes.DecodeError: case GatewayCloseCodes.DecodeError:
case GatewayCloseCodes.NotAuthenticated: case GatewayCloseCodes.NotAuthenticated: