Minor warning fix

This commit is contained in:
RogueException
2015-12-29 21:03:56 -04:00
parent 705cb6208b
commit 1695a606bd

View File

@@ -61,11 +61,12 @@ namespace Discord.Net
while (!cancelToken.IsCancellationRequested) while (!cancelToken.IsCancellationRequested)
{ {
await Task.Delay(interval).ConfigureAwait(false); await Task.Delay(interval).ConfigureAwait(false);
int count = _pending.Count; int count = _pending.Count;
if (count > _nextWarning) if (count >= _nextWarning)
{ {
_logger.Warning($"Queue is backed up, currently at {_nextWarning} messages.");
_nextWarning *= 2; _nextWarning *= 2;
_logger.Warning($"Queue is backed up, currently at {count} messages.");
} }
else if (count < WarningStart) //Reset once the problem is solved else if (count < WarningStart) //Reset once the problem is solved
_nextWarning = WarningStart; _nextWarning = WarningStart;