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:
@@ -1,4 +1,4 @@
|
|||||||
#pragma warning disable CS0618
|
#pragma warning disable CS0618
|
||||||
using Discord.API;
|
using Discord.API;
|
||||||
using Discord.API.Gateway;
|
using Discord.API.Gateway;
|
||||||
using Discord.Logging;
|
using Discord.Logging;
|
||||||
@@ -416,11 +416,8 @@ namespace Discord.WebSocket
|
|||||||
|
|
||||||
_sessionId = null;
|
_sessionId = null;
|
||||||
_lastSeq = 0;
|
_lastSeq = 0;
|
||||||
bool retry = (bool)payload;
|
|
||||||
if (retry)
|
await ApiClient.SendIdentifyAsync(shardID: ShardId, totalShards: TotalShards).ConfigureAwait(false);
|
||||||
_connection.Reconnect(); //TODO: Untested
|
|
||||||
else
|
|
||||||
await ApiClient.SendIdentifyAsync(shardID: ShardId, totalShards: TotalShards).ConfigureAwait(false);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GatewayOpCode.Reconnect:
|
case GatewayOpCode.Reconnect:
|
||||||
|
|||||||
Reference in New Issue
Block a user