From 73ac9d7886aa48b9d809c56e51945056f3b67232 Mon Sep 17 00:00:00 2001 From: Christopher F Date: Sat, 27 Jan 2018 16:08:01 -0500 Subject: [PATCH] Remove incomplete reconnect handler for certain session invalidations This resolves #938 and #883 Note: This fix is not 'verified' in production (I waited over a week for another full Discord outage and never encountered one), but I do have it on record from b1nzy that Discord may send an OP9 with `{"d": true}` during outages, so this would appear to be the proper fix. The removed code seems to have been leftover from when ConnectionManager was rewritten and never finished. --- src/Discord.Net.WebSocket/DiscordSocketClient.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Discord.Net.WebSocket/DiscordSocketClient.cs b/src/Discord.Net.WebSocket/DiscordSocketClient.cs index c220c337b..142f24417 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketClient.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketClient.cs @@ -1,4 +1,4 @@ -#pragma warning disable CS0618 +#pragma warning disable CS0618 using Discord.API; using Discord.API.Gateway; using Discord.Logging; @@ -416,11 +416,8 @@ namespace Discord.WebSocket _sessionId = null; _lastSeq = 0; - bool retry = (bool)payload; - if (retry) - _connection.Reconnect(); //TODO: Untested - else - await ApiClient.SendIdentifyAsync(shardID: ShardId, totalShards: TotalShards).ConfigureAwait(false); + + await ApiClient.SendIdentifyAsync(shardID: ShardId, totalShards: TotalShards).ConfigureAwait(false); } break; case GatewayOpCode.Reconnect: