Commit 9a53f334 authored by Martin Hurton's avatar Martin Hurton

Don't reconnect on protocol errors

parent ed076d46
......@@ -376,10 +376,22 @@ void zmq::session_base_t::engine_error (
if (pipe)
clean_pipes ();
zmq_assert (reason == stream_engine_t::connection_error
|| reason == stream_engine_t::timeout_error
|| reason == stream_engine_t::protocol_error);
switch (reason) {
case stream_engine_t::timeout_error:
case stream_engine_t::connection_error:
if (active)
reconnect ();
else
terminate ();
break;
case stream_engine_t::protocol_error:
terminate ();
break;
}
// Just in case there's only a delimiter in the pipe.
if (pipe)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment