Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetMQConfig.Cleanup() hangs forever even after dispose #1040

Open
Sahasrara opened this issue Nov 10, 2022 · 1 comment
Open

NetMQConfig.Cleanup() hangs forever even after dispose #1040

Sahasrara opened this issue Nov 10, 2022 · 1 comment

Comments

@Sahasrara
Copy link

Sahasrara commented Nov 10, 2022

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();
	    }
    }
@follesoe
Copy link

follesoe commented Feb 2, 2023

Experiencing the same issue on macOS and Xamarin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants