Skip to content

Commit

Permalink
Fix a hang due to a WireMessage deserialization error.
Browse files Browse the repository at this point in the history
If WireMessage deserialization occurs with an error, then the CountdownEvent increment is performed without a guaranteed decrement in the finally block.  Therefore, deserialization is included in the try block.
  • Loading branch information
sancheolz authored Nov 20, 2024
1 parent 8c9f3ee commit 458d0b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CoreRemoting/RemotingSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ private void OnReceiveMessage(byte[] rawMessage)

_currentlyProcessedMessagesCounter.AddCount(1);

var message = _server.Serializer.Deserialize<WireMessage>(rawMessage);

try
{
var message = _server.Serializer.Deserialize<WireMessage>(rawMessage);

switch (message.MessageType.ToLower())
{
case "auth":
Expand Down

0 comments on commit 458d0b2

Please sign in to comment.