zeromq / netmq

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

Socket.Exception after NetMQBeacon object is idle and not subscribed for anything #995

Open JYTEKTaiwan opened 2 years ago

JYTEKTaiwan commented 2 years ago

Environment

NetMQ Version:    4.0.1.6
Operating System:  Win10 21H1 19043
.NET Version:     4.7.2

Expected behaviour

NetMQBeacon object only created and configured, without subscribe anything. We're expecting nothing to happen if there's no other beacon is publishing message in the web.

Actual behaviour

Error message popup after couple minutes idle System.Net.Sockets.SocketException: A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself.

Steps to reproduce the behaviour

            NetMQBeacon _beacon = new NetMQBeacon();
            _beacon.ConfigureAllInterfaces(9999);
             Stopwatch sw = new Stopwatch();
             sw.Restart();

             while (true)
                {
                    Thread.Sleep(5000);
                    Console.WriteLine(sw.Elapsed);
                }