Skip to content

Commit

Permalink
misc: avoid Task.Yield().
Browse files Browse the repository at this point in the history
  • Loading branch information
b11p committed Sep 27, 2021
1 parent bb700e2 commit 3fcde6c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Sisters.WudiLib.WebSocket/WebSocketEventExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ internal static class WebSocketEventExtensions
{
internal static async Task ProcessWSMessageAsync(this ApiPostListener listener, JObject eventObject)
{
await Task.Yield();
var response = listener.ProcessPost(eventObject);
var response = await Task.Run(() => listener.ProcessPost(eventObject)).ConfigureAwait(false);
var apiClient = listener.ApiClient;
if (response is RequestResponse && !(apiClient is null))
{
Expand Down

0 comments on commit 3fcde6c

Please sign in to comment.