netmq icon indicating copy to clipboard operation
netmq copied to clipboard

NetMQConfig.Cleanup() hangs forever even after dispose

Open Sahasrara opened this issue 2 years ago • 3 comments

Environment

NetMQ Version:   4.0.1.10
Operating System: macOS 12.6
.NET Version: Unity 2022.1.21f1

Expected behaviour

I would expect the program not to block forever.

Actual behaviour

The program blocks forever.

Steps to reproduce the behaviour

    public static void ZeroMQ()
    {
	    try
	    {
		    TimeSpan timeout = TimeSpan.FromMilliseconds(2000);
		    AsyncIO.ForceDotNet.Force();
		    using (PairSocket client = new PairSocket("tcp://127.0.0.1:5555"))
		    {
                            client.Options.Linger = TimeSpan.Zero;
			    bool success = client.TrySendFrame(timeout, "Hello");
			    Debug.Log($"Success = {success}");
			    string msg = string.Empty;
			    success = client.TryReceiveFrameString(timeout, out msg);
			    Debug.Log($"Success = {success} - {msg}");
			    success = client.TryReceiveFrameString(timeout, out msg);
			    Debug.Log($"Success = {success} - {msg}");
		    }
	    }
	    catch (Exception e)
	    {
		    Debug.Log(e);
	    }
	    finally
	    {
		    NetMQConfig.Cleanup();
	    }
    }

Sahasrara avatar Nov 10 '22 05:11 Sahasrara

Experiencing the same issue on macOS and Xamarin.

follesoe avatar Feb 02 '23 08:02 follesoe

I'm currently experiencing the same issue on macOS.

waterpare833 avatar Jul 04 '24 07:07 waterpare833

I have the same issue on NetMQ 4.0.1.13 - macOS. Everything is fine on Windows. Unity 2022.3.38f

Archtica avatar Jul 24 '24 20:07 Archtica