I know this is NOT the answer you want, but I experienced something similar with ZeroMQ on Linux. The main Linux connector is closed and some messages have not passed it.
In my use case, I keep the server open until the user gives me any keyboard input. This is a hack, but for my use case it gives me what I want.
You can also sleep for a second or two before closing the socket. Once again, not very, but it can be a quick fix until it is fixed.
Edited to add: I also send messages with several parts, and one of my message parts is quite large (~ 200 MB).
source
share