-
Notifications
You must be signed in to change notification settings - Fork 738
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
Cannot close an uninitialised Msg. #1054
Comments
Are you able to try your proposed fix to see if it stops the issue you are seeing? |
I have no possibility to reproduce the problem consistently. It happens randomly. In fact I think the check should be removed in Close() and moved to the XXXInit() functions so these throws exception if not MsgType is Uninitialised, that would be more logical. |
I run into the same issue randomly too. Difficult to reproduce but looks like it happens under heavy load. |
We are seeing the problem again. I still think it is better to allow Close() handle !Initialized: /// Clear the and set the MsgType to Invalid. /// If this is not a shared-data Msg (MsgFlags.Shared is not set), or it is shared but the reference-counter has dropped to zero, /// then return the data back to the BufferPool. /// /// The object is not initialised. public void Close() { if (IsInitialised) { if (MsgType == MsgType.Pool) { Assumes.NotNull(m_refCount); Assumes.NotNull(m_data);
|
Environment
Expected behaviour
No exception
Actual behaviour
Steps to reproduce the behaviour
Appears randomly - mostly under heavy load.
Examining the NetMQ code it looks like the issue occurs in EncoderBase.cs Encode function here:
I point at this place because following the call-tree it is the only place I can find where Msg could be Uninitialised.
The text was updated successfully, but these errors were encountered: