Skip to content

Commit

Permalink
Adding a couple missing ConfigureAwait(false) calls
Browse files Browse the repository at this point in the history
  • Loading branch information
soxtoby committed Aug 31, 2024
1 parent 6848581 commit 0dfc362
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SlackNet.AzureFunctions/SlackFunctionResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public async Task ExecuteResultAsync(ActionContext context)
// Request service provider is disposed before OnCompleted callbacks are called,
// so we'll just need to wait for them to run before responding
foreach (var callback in slackResult.RequestCompletedCallbacks)
await callback();
await callback().ConfigureAwait(false);

if (slackResult.ContentType != null)
response.ContentType = slackResult.ContentType;
Expand All @@ -28,6 +28,6 @@ public async Task ExecuteResultAsync(ActionContext context)

public static class SlackResultExtensions
{
public static async Task<SlackFunctionResult> FunctionResult(this Task<SlackResult> slackResult) => (await slackResult).FunctionResult();
public static async Task<SlackFunctionResult> FunctionResult(this Task<SlackResult> slackResult) => (await slackResult.ConfigureAwait(false)).FunctionResult();
public static SlackFunctionResult FunctionResult(this SlackResult slackResult) => new(slackResult);
}

0 comments on commit 0dfc362

Please sign in to comment.