Fixing Async Deadlock

Adding missing ConfigureAwait + put on single line await &
ConfigureAwait
This commit is contained in:
zzzprojects
2016-10-03 11:24:07 -04:00
parent 01c66147b1
commit 82dfabefa7
6 changed files with 18 additions and 28 deletions
+2 -4
View File
@@ -259,8 +259,7 @@ namespace Octokit
try
{
var endpoint = ApiUrls.MergePullRequest(owner, name, number);
return await ApiConnection.Put<PullRequestMerge>(endpoint, mergePullRequest, null,
AcceptHeaders.SquashCommitPreview).ConfigureAwait(false);
return await ApiConnection.Put<PullRequestMerge>(endpoint, mergePullRequest, null, AcceptHeaders.SquashCommitPreview).ConfigureAwait(false);
}
catch (ApiException ex)
{
@@ -292,8 +291,7 @@ namespace Octokit
try
{
var endpoint = ApiUrls.MergePullRequest(repositoryId, number);
return await ApiConnection.Put<PullRequestMerge>(endpoint, mergePullRequest, null,
AcceptHeaders.SquashCommitPreview).ConfigureAwait(false);
return await ApiConnection.Put<PullRequestMerge>(endpoint, mergePullRequest, null, AcceptHeaders.SquashCommitPreview).ConfigureAwait(false);
}
catch (ApiException ex)
{