Skip to content

Commit 47b422d

Browse files
committed
Revert "If there is no destination (i.e. CommandType.Done), just skip it."
This reverts commit 7f9fb67.
1 parent c4b4ba2 commit 47b422d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/NetMQ/Core/IOThread.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ public void Ready()
9191
// Process all available commands.
9292
while (m_mailbox.TryRecv(out Command command))
9393
{
94-
command.Destination?.ProcessCommand(command);
94+
Assumes.NotNull(command.Destination);
95+
command.Destination.ProcessCommand(command);
9596
}
9697
}
9798

src/NetMQ/Core/Reaper.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,10 @@ public void InEvent()
126126
if (!m_mailbox.TryRecv(0, out Command command))
127127
break;
128128

129+
Assumes.NotNull(command.Destination);
130+
129131
// Process the command.
130-
command.Destination?.ProcessCommand(command);
132+
command.Destination.ProcessCommand(command);
131133
}
132134
}
133135

src/NetMQ/Core/SocketBase.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,8 @@ private void ProcessCommands(int timeout, bool throttle, CancellationToken cance
12611261
// Process all the commands available at the moment.
12621262
while (found)
12631263
{
1264-
command.Destination?.ProcessCommand(command);
1264+
Assumes.NotNull(command.Destination);
1265+
command.Destination.ProcessCommand(command);
12651266
found = m_mailbox.TryRecv(0, out command);
12661267
}
12671268

0 commit comments

Comments
 (0)