Reconnect if heartbeat fails and a user download was not requested

This commit is contained in:
RogueException
2016-12-04 17:21:05 -04:00
parent d4d8e721db
commit 08cfc1dd7f

View File

@@ -1659,7 +1659,7 @@ namespace Discord.WebSocket
{
if (_heartbeatTime != 0) //Server never responded to our last heartbeat
{
if (ConnectionState == ConnectionState.Connected && (_guildDownloadTask?.IsCompleted ?? false))
if (ConnectionState == ConnectionState.Connected && (_guildDownloadTask?.IsCompleted ?? true))
{
await _gatewayLogger.WarningAsync("Server missed last heartbeat").ConfigureAwait(false);
await StartReconnectAsync(new Exception("Server missed last heartbeat")).ConfigureAwait(false);