fix: preserve discord policy close narrowing

This commit is contained in:
Peter Steinberger
2026-05-31 13:28:53 +01:00
parent 1e54e908e2
commit fd88f34a8f

View File

@@ -159,10 +159,10 @@ function shouldLogDiscordGatewayTransportClose(params: {
lastError?: DiscordGatewayTransportErrorDetails;
}): boolean {
return (
params.code === DISCORD_GATEWAY_POLICY_VIOLATION_CLOSE_CODE ||
(params.code !== 1000 && params.code !== 1001) ||
params.reason.length > 0 ||
params.lastError !== undefined ||
params.code === DISCORD_GATEWAY_POLICY_VIOLATION_CLOSE_CODE
params.lastError !== undefined
);
}