Browse Source

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.
tags/2.0.0-beta
Christopher F 7 years ago
parent
commit
73ac9d7886
1 changed files with 3 additions and 6 deletions
  1. +3
    -6
      src/Discord.Net.WebSocket/DiscordSocketClient.cs

+ 3
- 6
src/Discord.Net.WebSocket/DiscordSocketClient.cs View File

@@ -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:


Loading…
Cancel
Save