NetMQ Version: 4.0.1.12
Operating System: Windows 11
.NET Version: 6
Expected behaviour
I expect the TCP sockets to be released when disposing a Subscriber socket.
Actual behaviour
The process hangs after socket.Dispose() is called.
Steps to reproduce the behaviour
In my code, the subscriber socket will be used this way:
var socket = new SubscriberSocket();
var connectionAddress = $"tcp://{host.EnsureIsNotNullOrEmpty()}:{port}";
socket.Connect(_connectionAddress);
socket.SubscribeToAnyTopic();
var receiveLogThread = new Thread(() => ReceiveLog(host, port));
receiveLogThread.IsBackground = true;
receiveLogThread.Start();
Environment
Expected behaviour
I expect the TCP sockets to be released when disposing a Subscriber socket.
Actual behaviour
The process hangs after
socket.Dispose()
is called.Steps to reproduce the behaviour
In my code, the subscriber socket will be used this way:
ReceiveLog is implemented:
And at disposal:
Expect that the process can exit after Dispose() is called.
With logging in the code, I can confirm that it hangs after calling socket.Dispose().