zeromq / netmq

A 100% native C# implementation of ZeroMQ for .NET
Other
2.93k stars 744 forks source link

Try catch for blocking recieve which can throw #1087

Closed tmatthey closed 2 months ago

tmatthey commented 2 months ago

Fixes #1086

If DNS is not accessible we get the poller throwing:

Unhandled exception. System.Net.Sockets.SocketException (11): Resource temporarily unavailable
   at System.Net.Sockets.Socket.Receive(Byte[] buffer)
   at NetMQ.Core.Utils.Signaler.Recv()
   at NetMQ.Core.Mailbox.TryRecv(Int32 timeout, Command& command)
   at NetMQ.Core.SocketBase.ProcessCommands(Int32 timeout, Boolean throttle, CancellationToken cancellationToken)
   at NetMQ.Core.SocketBase.GetSocketOption(ZmqSocketOption option)
   at NetMQ.NetMQSelector.Select(Item[] items, Int32 itemsCount, Int64 timeout)
   at NetMQ.NetMQPoller.RunPoller()
   at NetMQ.NetMQPoller.Run(SynchronizationContext syncContext)
   at NetMQ.NetMQPoller.Run()
   at System.Threading.Thread.StartCallback()
tmatthey commented 2 months ago

Hi, Since I have not write access to complete the pull request, is there any how could help me out and merge this PR? Thanks in advance.

tmatthey commented 2 months ago

@drewnoakes thanks a lot! Do you know when a new package will be published on nuget.org with this fix?