Browse Source

Minor warning fix

pull/22/merge
RogueException 9 years ago
parent
commit
1695a606bd
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/Discord.Net/MessageQueue.cs

+ 3
- 2
src/Discord.Net/MessageQueue.cs 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;


Loading…
Cancel
Save