Merge pull request #580 from hurtonm/master

Stop ZMTP handshake when an unexpected message comes
This commit is contained in:
Ian Barber 2013-06-22 01:08:35 -07:00
commit c5078ea1b8
4 changed files with 5 additions and 5 deletions

View File

@ -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 ();

View File

@ -98,7 +98,7 @@ int zmq::curve_server_t::process_handshake_message (msg_t *msg_)
}
break;
default:
errno = EAGAIN;
errno = EPROTO;
rc = -1;
break;
}

View File

@ -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 ();

View File

@ -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;