mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-14 15:05:38 +02:00
Problem: termination is requested from a session's owner when already in
pending termination while processing an error Solution: terminate pipe instead Fixes #2723
This commit is contained in:
@@ -434,13 +434,19 @@ void zmq::session_base_t::engine_error (
|
|||||||
switch (reason) {
|
switch (reason) {
|
||||||
case stream_engine_t::timeout_error:
|
case stream_engine_t::timeout_error:
|
||||||
case stream_engine_t::connection_error:
|
case stream_engine_t::connection_error:
|
||||||
if (active)
|
if (active) {
|
||||||
reconnect ();
|
reconnect ();
|
||||||
else
|
break;
|
||||||
terminate ();
|
}
|
||||||
break;
|
|
||||||
case stream_engine_t::protocol_error:
|
case stream_engine_t::protocol_error:
|
||||||
terminate ();
|
if (pending) {
|
||||||
|
if (pipe)
|
||||||
|
pipe->terminate (0);
|
||||||
|
if (zap_pipe)
|
||||||
|
zap_pipe->terminate (0);
|
||||||
|
} else {
|
||||||
|
terminate ();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user