mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-13 22:50:19 +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) {
|
||||
case stream_engine_t::timeout_error:
|
||||
case stream_engine_t::connection_error:
|
||||
if (active)
|
||||
if (active) {
|
||||
reconnect ();
|
||||
else
|
||||
terminate ();
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case stream_engine_t::protocol_error:
|
||||
terminate ();
|
||||
if (pending) {
|
||||
if (pipe)
|
||||
pipe->terminate (0);
|
||||
if (zap_pipe)
|
||||
zap_pipe->terminate (0);
|
||||
} else {
|
||||
terminate ();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user