Fix negative sleep time
This commit is contained in:
parent
9a640aed27
commit
a71d65e666
@ -205,7 +205,8 @@ public abstract class Connector
|
||||
TimeSpan rateLimitTimeout = _rateLimit[requestType]
|
||||
.Subtract(DateTime.Now.Subtract(_lastExecutedRateLimit[requestType]));
|
||||
|
||||
Thread.Sleep(rateLimitTimeout);
|
||||
if(rateLimitTimeout > TimeSpan.Zero)
|
||||
Thread.Sleep(rateLimitTimeout);
|
||||
|
||||
HttpResponseMessage? response = null;
|
||||
while (response is null)
|
||||
|
Loading…
Reference in New Issue
Block a user