Added missing ConfigureAwaits
This commit is contained in:
@@ -116,7 +116,7 @@ namespace Discord.API
|
||||
_restClient.SetHeader("authorization", GetPrefixedToken(AuthTokenType, _authToken));
|
||||
|
||||
if (FetchCurrentUser)
|
||||
CurrentUser = await GetMyUserAsync(new RequestOptions { IgnoreState = true });
|
||||
CurrentUser = await GetMyUserAsync(new RequestOptions { IgnoreState = true }).ConfigureAwait(false);
|
||||
|
||||
LoginState = LoginState.LoggedIn;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace Discord.Net.Queue
|
||||
if (millis <= 0 || !await _semaphore.WaitAsync(millis).ConfigureAwait(false))
|
||||
throw new TimeoutException();
|
||||
|
||||
if (!await _semaphore.WaitAsync(0))
|
||||
if (!await _semaphore.WaitAsync(0).ConfigureAwait(false))
|
||||
{
|
||||
await _queue.RaiseRateLimitTriggered(Id, this, null).ConfigureAwait(false);
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Discord.Net.WebSockets
|
||||
await _sendLock.WaitAsync().ConfigureAwait(false);
|
||||
try
|
||||
{
|
||||
await ConnectInternalAsync(host);
|
||||
await ConnectInternalAsync(host).ConfigureAwait(false);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -86,7 +86,7 @@ namespace Discord.Net.WebSockets
|
||||
await _sendLock.WaitAsync().ConfigureAwait(false);
|
||||
try
|
||||
{
|
||||
await DisconnectInternalAsync();
|
||||
await DisconnectInternalAsync().ConfigureAwait(false);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Discord
|
||||
if (_info.Remaining == 0)
|
||||
return false;
|
||||
|
||||
var data = await _source._getPage(_info, cancelToken);
|
||||
var data = await _source._getPage(_info, cancelToken).ConfigureAwait(false);
|
||||
Current = new Page<T>(_info, data);
|
||||
|
||||
_info.Page++;
|
||||
|
||||
Reference in New Issue
Block a user