Added missing ConfigureAwaits

This commit is contained in:
RogueException
2016-10-08 16:59:17 -03:00
parent 960119d965
commit 5c33e28757
40 changed files with 166 additions and 166 deletions

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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
{

View File

@@ -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++;