doing await right by calling .ConfigureAwait(false)

This commit is contained in:
Brendan Forster
2013-10-31 12:06:46 +11:00
parent c22a9c874f
commit 43e82e124f
11 changed files with 28 additions and 28 deletions

View File

@@ -33,8 +33,8 @@ namespace Octokit.Internal
using (var requestMessage = BuildRequestMessage(request))
{
// Make the request
var responseMessage = await http.SendAsync(requestMessage, HttpCompletionOption.ResponseContentRead);
return await BuildResponse<T>(responseMessage);
var responseMessage = await http.SendAsync(requestMessage, HttpCompletionOption.ResponseContentRead).ConfigureAwait(false);
return await BuildResponse<T>(responseMessage).ConfigureAwait(false);
}
}
@@ -48,7 +48,7 @@ namespace Octokit.Internal
{
if (content != null)
{
responseBody = await responseMessage.Content.ReadAsStringAsync();
responseBody = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false);
contentType = GetContentType(content);
}
}