diff --git a/src/curve_client.cpp b/src/curve_client.cpp index 40dd6b0b..fae7414d 100644 --- a/src/curve_client.cpp +++ b/src/curve_client.cpp @@ -88,8 +88,9 @@ int zmq::curve_client_t::process_handshake_message (msg_t *msg_) state = connected; break; default: - errno = EAGAIN; + errno = EPROTO; rc = -1; + break; } if (rc == 0) { rc = msg_->close (); diff --git a/src/curve_server.cpp b/src/curve_server.cpp index a60b4d8e..87e56706 100644 --- a/src/curve_server.cpp +++ b/src/curve_server.cpp @@ -98,7 +98,7 @@ int zmq::curve_server_t::process_handshake_message (msg_t *msg_) } break; default: - errno = EAGAIN; + errno = EPROTO; rc = -1; break; } diff --git a/src/plain_mechanism.cpp b/src/plain_mechanism.cpp index d09a4577..6d7b2f9e 100644 --- a/src/plain_mechanism.cpp +++ b/src/plain_mechanism.cpp @@ -109,8 +109,9 @@ int zmq::plain_mechanism_t::process_handshake_message (msg_t *msg_) state = ready; break; default: - errno = EAGAIN; + errno = EPROTO; rc = -1; + break; } if (rc == 0) { rc = msg_->close (); diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index 61533897..16404e05 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -599,8 +599,6 @@ int zmq::stream_engine_t::next_handshake_message (msg_t *msg_) if (rc == 0) { if (mechanism->is_handshake_complete ()) mechanism_ready (); - if (input_paused) - activate_in (); } return rc;