Skip to content

Commit

Permalink
Problem: CURVE server (connect) fails when client rebinds
Browse files Browse the repository at this point in the history
Solution: if a CURVE server is using zmq_connect, the same session
will be used for any client "reconnect" (actual binds). This is
acceptable, so do not assert if zap_pipe already exists during the
handshake, but simply reuse it.
Fixes zeromq#2608
  • Loading branch information
bluca committed Jul 1, 2017
1 parent 4e6c89e commit d04065b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/session_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ void zmq::session_base_t::process_plug ()
// security flaw.
int zmq::session_base_t::zap_connect ()
{
zmq_assert (zap_pipe == NULL);
if (zap_pipe != NULL)
return 0;

endpoint_t peer = find_endpoint ("inproc://zeromq.zap.01");
if (peer.socket == NULL) {
Expand Down

0 comments on commit d04065b

Please sign in to comment.