Skip to content

Commit

Permalink
Remove incomplete reconnect handler for certain session invalidations
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
foxbot committed Jan 27, 2018
1 parent 05cd1ff commit 73ac9d7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Discord.Net.WebSocket/DiscordSocketClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma warning disable CS0618
#pragma warning disable CS0618
using Discord.API;
using Discord.API.Gateway;
using Discord.Logging;
Expand Down Expand Up @@ -416,11 +416,8 @@ private async Task ProcessMessageAsync(GatewayOpCode opCode, int? seq, string ty

_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:
Expand Down

0 comments on commit 73ac9d7

Please sign in to comment.