mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 07:56:09 +00:00
Don't reconnect on protocol errors
This commit is contained in:
parent
ed076d4620
commit
9a53f334d2
@ -376,10 +376,22 @@ void zmq::session_base_t::engine_error (
|
|||||||
if (pipe)
|
if (pipe)
|
||||||
clean_pipes ();
|
clean_pipes ();
|
||||||
|
|
||||||
if (active)
|
zmq_assert (reason == stream_engine_t::connection_error
|
||||||
reconnect ();
|
|| reason == stream_engine_t::timeout_error
|
||||||
else
|
|| reason == stream_engine_t::protocol_error);
|
||||||
terminate ();
|
|
||||||
|
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.
|
// Just in case there's only a delimiter in the pipe.
|
||||||
if (pipe)
|
if (pipe)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user