zmq_disconnect and zmq_unbind may make pipes linger indefinitely

Description

When using unbind/disconnect with tcp endpoints where there are outstanding outgoing messages, the pipes on the sockets may linger indefinitely regardless of the ZMQ_LINGER setting.

Test case is attached. With the unbind call:

1 2 ERROR: can still receive on B: ABC ERROR: can still receive on B: DEF

With the disconnect call:

1 2 ERROR: can still send on A ERROR: can still receive on B: ABC

The differences are probably not due to unbind/disconnect but rather due to which side has outstanding messages in which pipe.

Environment

Ubuntu 12.10, x64

Status

Assignee

Unassigned

Reporter

Christian Kamm

Labels

None

Components

Affects versions

4.0.0

Priority

Minor