zeromq / netmq

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

NetMQMonitorSocketEventArgs #1061

Open kcj3054 opened 1 year ago

kcj3054 commented 1 year ago

Environment

NetMQ Version:  v4.0.1.12
Operating System: windows
.NET Version:  6.0   

problem

As I am using netmq in my current project, the current NetMQMonitorSocketEventArgs throws a socketException. Can you tell me the reason in detail?

drewnoakes commented 1 year ago

That class cannot throw an exception.

https://github.com/zeromq/netmq/blob/226248aeb10f6f2955ee309b92f5d7be8a793e1c/src/NetMQ/Monitoring/NetMQMonitorEventArgs.cs#L40-L62

You will have to provide more details.

kcj3054 commented 1 year ago

The server was under load and the server was in the process of connecting to the gatewayServer. As the load continued, a socketException occurred, and the server was down again, so I tried to connect to the gatewayServer again.

drewnoakes commented 1 year ago

Do you have a stack trace of the exception?

kcj3054 commented 1 year ago

Thread.StartCallback() -> NetMQPoller.Run -> NetMQPoller.Run -> NetMQPoller.RunPoller -> NetMQSocket.invokeEvents -> NetmqMonitor.Handle -> ArgumentException("Command argument must be of type " + typeof (T).Name + ".");

kcj3054 commented 1 year ago

I am currently using multithreading.