Browse Source

Fixed sending requests with no options obj

pull/97/head
RogueException 9 years ago
parent
commit
1f5f443927
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/Discord.Net/Net/Queue/RestRequest.cs

+ 3
- 1
src/Discord.Net/Net/Queue/RestRequest.cs View File

@@ -35,13 +35,15 @@ namespace Discord.Net.Queue

private RestRequest(IRestClient client, string method, string endpoint, bool headerOnly, RequestOptions options)
{
var timeout = options?.Timeout;

Client = client;
Method = method;
Endpoint = endpoint;
Json = null;
MultipartParams = null;
HeaderOnly = headerOnly;
TimeoutTick = options.Timeout.HasValue ? (int?)unchecked(Environment.TickCount + options.Timeout.Value) : null;
TimeoutTick = timeout.HasValue ? (int?)unchecked(Environment.TickCount + timeout.Value) : null;
Promise = new TaskCompletionSource<Stream>();
}



Loading…
Cancel
Save