Problem: commit afb24b53 broke ZMQ_STREAM contract

Symptom is that ZMQ_STREAM sockets in 4.1.0 and 4.1.1 generate zero
sized messages on each new connection, unlike 4.0.x which did not do
this.

Person who made this commit also changed test cases so that contract
breakage did not show. Same person was later banned for persistently
poor form in CZMQ contributions.

Solution: enable connect notifications on ZMQ_STREAM sockets using a
new ZMQ_STREAM_NOTIFY setting. By default, socket does not deliver
notifications, and behaves as in 4.0.x.

Fixes #1316
This commit is contained in:
Pieter Hintjens
2015-01-23 15:25:40 +01:00
parent 94d9a4ffdf
commit 6ced7027a0
13 changed files with 73 additions and 37 deletions

View File

@@ -213,14 +213,15 @@ void zmq::session_base_t::pipe_terminated (pipe_t *pipe_)
cancel_timer (linger_timer_id);
has_linger_timer = false;
}
} else
}
else
if (pipe_ == zap_pipe)
zap_pipe = NULL;
else
// Remove the pipe from the detached pipes set
terminating_pipes.erase (pipe_);
if (!is_terminating () && options.raw_sock) {
if (!is_terminating () && options.raw_socket) {
if (engine) {
engine->terminate ();
engine = NULL;