Fixed sending requests with no options obj
This commit is contained in:
@@ -35,13 +35,15 @@ namespace Discord.Net.Queue
|
|||||||
|
|
||||||
private RestRequest(IRestClient client, string method, string endpoint, bool headerOnly, RequestOptions options)
|
private RestRequest(IRestClient client, string method, string endpoint, bool headerOnly, RequestOptions options)
|
||||||
{
|
{
|
||||||
|
var timeout = options?.Timeout;
|
||||||
|
|
||||||
Client = client;
|
Client = client;
|
||||||
Method = method;
|
Method = method;
|
||||||
Endpoint = endpoint;
|
Endpoint = endpoint;
|
||||||
Json = null;
|
Json = null;
|
||||||
MultipartParams = null;
|
MultipartParams = null;
|
||||||
HeaderOnly = headerOnly;
|
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>();
|
Promise = new TaskCompletionSource<Stream>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user