Closing a socket directly after send discards the message

Description

I discovered an issue with ZMQ which involves closing a socket directly after sending a message through it. Usually, this works as expected and the socket blocks and sends all queued messages before closing. However when sending large messages (megabytes), this mechanism seems to be broken.

I have attached a test case which shows this bug. It's in Python, but it should show the same buggy behaviour in other bindings as well. Run zmqrecv.py, then in another console run zmqsend.py. On my system, most of the messages get discarded and never delivered. After running the sender for a few seconds, it crashes. On another system, it doesn't crash, but still only a very low number of messages are delivered.

Environment

None

Status

Assignee

Unassigned

Reporter

Kuba Mracek

Labels

None

Components

Affects versions

3.2.2
4.0.0
3.2.3

Priority

Major
Configure