Fixed requests timing out immediately

This commit is contained in:
RogueException
2016-07-20 19:18:43 -03:00
parent baadeb4c6f
commit c958a6ffdf

View File

@@ -148,7 +148,7 @@ namespace Discord.Net.Queue
{
if (endTick.HasValue)
{
int millis = unchecked(Environment.TickCount - endTick.Value);
int millis = unchecked(endTick.Value - Environment.TickCount);
if (millis <= 0 || !await _semaphore.WaitAsync(millis).ConfigureAwait(false))
throw new TimeoutException();
}