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.
This commit is contained in:
Christopher F
2018-01-27 16:08:01 -05:00
parent 05cd1ff85b
commit 73ac9d7886

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: