Commit 1f10208a authored by Martin Sustrik's avatar Martin Sustrik

termination of pipe via delimiter message could stuck when no data were read…

termination of pipe via delimiter message could stuck when no data were read from the pipe (because connection wasn't active) -- fixed
parent 5153b636
...@@ -160,6 +160,13 @@ void zmq::session_t::process_plug () ...@@ -160,6 +160,13 @@ void zmq::session_t::process_plug ()
void zmq::session_t::finalise () void zmq::session_t::finalise ()
{ {
// There may be delimiter waiting in the inbound pipe, never to be read
// because the connection cannot be established. In order to terminate
// decently in such case, do check_read which will in turn start the pipe
// termination process if there's delimiter in it.
if (in_pipe)
in_pipe->check_read ();
// If all conditions are met, proceed with termination: // If all conditions are met, proceed with termination:
// 1. Owner object already asked us to terminate. // 1. Owner object already asked us to terminate.
// 2. The pipes were already attached to the session. // 2. The pipes were already attached to the session.
......
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