You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NetMQ Version: 4.0.1.13 with [PR 1087](https://github.com/zeromq/netmq/pull/1087) debug mode
Operating System: Alpine Linux
.NET Version: standard 2.0
Expected behaviour
Mailbox.TryRead should not throw when returning a command for debug mode.
Actual behaviour
When run in debug mode Debug.Assert(ok); may throw since m_commandPipe.TryRead may return false:
Process terminated. Assertion failed.
at NetMQ.Core.Mailbox.TryRecv(Int32 timeout, Command& command)
at NetMQ.Core.SocketBase.ProcessCommands(Int32 timeout, Boolean throttle, CancellationToken cancellationToken)
at NetMQ.Core.SocketBase.GetSocketOptionX(ZmqSocketOption option)
at NetMQ.NetMQSocket.GetSocketOptionX[T](ZmqSocketOption option)
at NetMQ.NetMQSocket.get_HasIn()
Steps to reproduce the behaviour
A one-off on Alpine Linux, most probably when DNS disappears.
How to potentially fix
Remove Debug.Assert(ok);, just return value of m_commandPipe.TryRead. I'm not certain if caller of Mailbox.TryRead may check if command.Destination to be not zero when processing the command, i.e., reading a command with CommandType.Done sent by ZObject.SendDone(), which has no destination.
The text was updated successfully, but these errors were encountered:
Environment
Expected behaviour
Mailbox.TryRead should not throw when returning a command for debug mode.
Actual behaviour
When run in debug mode
Debug.Assert(ok);
may throw sincem_commandPipe.TryRead
may return false:Steps to reproduce the behaviour
A one-off on Alpine Linux, most probably when DNS disappears.
How to potentially fix
Remove
Debug.Assert(ok);
, just return value ofm_commandPipe.TryRead
. I'm not certain if caller ofMailbox.TryRead
may check ifcommand.Destination
to be not zero when processing the command, i.e., reading a command withCommandType.Done
sent by ZObject.SendDone(), which has no destination.The text was updated successfully, but these errors were encountered: