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
@ -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…
Reference in New Issue
Block a user