mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Don't kill the gateway session when trying to resume
Sending a close code of 1000 or 1001 invalidates gateway sessions. Instead, we use close code 1005 (no error specified)
This commit is contained in:
parent
e620e30c10
commit
889e1a8331
1 changed files with 3 additions and 1 deletions
|
|
@ -163,7 +163,9 @@ namespace Myriad.Gateway
|
|||
private async Task HandleReconnect()
|
||||
{
|
||||
_logger.Information("Shard {ShardId}: Received Reconnect", _info.ShardId);
|
||||
await DoReconnect(WebSocketCloseStatus.NormalClosure, TimeSpan.FromSeconds(1));
|
||||
// close code 1000 kills the session, so can't reconnect
|
||||
// we use 1005 (no error specified) instead
|
||||
await DoReconnect(WebSocketCloseStatus.Empty, TimeSpan.FromSeconds(1));
|
||||
}
|
||||
|
||||
private Task HandleReady(ReadyEvent ready)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue