Skip to content

Commit

Permalink
Revert "If there is no destination (i.e. CommandType.Done), just skip…
Browse files Browse the repository at this point in the history
… it."

This reverts commit 7f9fb67.
  • Loading branch information
tmatthey committed May 24, 2024
1 parent c4b4ba2 commit 47b422d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/NetMQ/Core/IOThread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public void Ready()
// Process all available commands.
while (m_mailbox.TryRecv(out Command command))
{
command.Destination?.ProcessCommand(command);
Assumes.NotNull(command.Destination);
command.Destination.ProcessCommand(command);
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/NetMQ/Core/Reaper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ public void InEvent()
if (!m_mailbox.TryRecv(0, out Command command))
break;

Assumes.NotNull(command.Destination);

// Process the command.
command.Destination?.ProcessCommand(command);
command.Destination.ProcessCommand(command);
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/NetMQ/Core/SocketBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,8 @@ private void ProcessCommands(int timeout, bool throttle, CancellationToken cance
// Process all the commands available at the moment.
while (found)
{
command.Destination?.ProcessCommand(command);
Assumes.NotNull(command.Destination);
command.Destination.ProcessCommand(command);
found = m_mailbox.TryRecv(0, out command);
}

Expand Down

0 comments on commit 47b422d

Please sign in to comment.