mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-19 16:56:11 +01:00
Merge pull request #2283 from vtellier/master
Fixed issue #2227 second part
This commit is contained in:
commit
ec2ba8a997
@ -421,8 +421,7 @@ void zmq::session_base_t::engine_error (
|
||||
if (pipe)
|
||||
clean_pipes ();
|
||||
|
||||
zmq_assert (reason == stream_engine_t::encryption_error
|
||||
|| reason == stream_engine_t::connection_error
|
||||
zmq_assert (reason == stream_engine_t::connection_error
|
||||
|| reason == stream_engine_t::timeout_error
|
||||
|| reason == stream_engine_t::protocol_error);
|
||||
|
||||
@ -434,7 +433,6 @@ void zmq::session_base_t::engine_error (
|
||||
else
|
||||
terminate ();
|
||||
break;
|
||||
case stream_engine_t::encryption_error:
|
||||
case stream_engine_t::protocol_error:
|
||||
terminate ();
|
||||
break;
|
||||
|
@ -356,10 +356,7 @@ void zmq::stream_engine_t::in_event ()
|
||||
// or the session has rejected the message.
|
||||
if (rc == -1) {
|
||||
if (errno != EAGAIN) {
|
||||
if(this->process_msg == &stream_engine_t::process_handshake_command)
|
||||
error(encryption_error);
|
||||
else
|
||||
error(protocol_error);
|
||||
error(protocol_error);
|
||||
return;
|
||||
}
|
||||
input_stopped = true;
|
||||
@ -981,7 +978,7 @@ void zmq::stream_engine_t::error (error_reason_t reason)
|
||||
}
|
||||
zmq_assert (session);
|
||||
#ifdef ZMQ_BUILD_DRAFT_API
|
||||
if(reason == encryption_error)
|
||||
if(mechanism == NULL || mechanism->status() == mechanism_t::handshaking)
|
||||
socket->event_handshake_failed(endpoint, (int) s);
|
||||
#endif
|
||||
socket->event_disconnected (endpoint, (int) s);
|
||||
|
@ -65,8 +65,7 @@ namespace zmq
|
||||
enum error_reason_t {
|
||||
protocol_error,
|
||||
connection_error,
|
||||
timeout_error,
|
||||
encryption_error
|
||||
timeout_error
|
||||
};
|
||||
|
||||
stream_engine_t (fd_t fd_, const options_t &options_,
|
||||
|
@ -19,6 +19,8 @@ to add a sleep, please be consistent with all the other tests and use:
|
||||
|
||||
# Building tests in Windows
|
||||
|
||||
According to the version of your compiler, you should adapt the path `libzmq.lib` in the file `tests/CMakeLists.txt`.
|
||||
|
||||
Install CMAKE
|
||||
CMD> CMAKE libzmq/tests
|
||||
CMD> tests.sln
|
||||
|
Loading…
x
Reference in New Issue
Block a user