Skip to content

Commit

Permalink
Revert commit fedfd5d to avoid the deadlock (when WatsonTcpClient.Dat…
Browse files Browse the repository at this point in the history
…aReceive task is waiting for the OnMessage event handler to complete).
  • Loading branch information
yallie committed Jan 9, 2025
1 parent 11f7ccb commit 44a5cd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CoreRemoting/RemotingClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ await _authenticationCompletedTaskSource.Task.Timeout(
/// Called when a message is received from server.
/// </summary>
/// <param name="rawMessage">Raw message data</param>
private void OnMessage(byte[] rawMessage)
private void OnMessage(byte[] rawMessage) => Task.Run(() =>
{
var message = TryDeserialize(rawMessage);

Expand Down Expand Up @@ -472,7 +472,7 @@ private void OnMessage(byte[] rawMessage)
// A wire message could have been tampered with and couldn't be deserialized
break;
}
}
});

private WireMessage TryDeserialize(byte[] rawMessage)
{
Expand Down

0 comments on commit 44a5cd9

Please sign in to comment.