diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-09-19 08:42:19 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-09-19 08:42:19 +0200 |
commit | 1f10208ad065c01e172669affdd48b6f2698ff4c (patch) | |
tree | 1eaab69f2773ab9ed37c6ea98218165c25767b37 /src | |
parent | 5153b6368be58d0fcaea262463a3fc08ea658f78 (diff) |
termination of pipe via delimiter message could stuck when no data were read from the pipe (because connection wasn't active) -- fixed
Diffstat (limited to 'src')
-rw-r--r-- | src/session.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/session.cpp b/src/session.cpp index eb8967a..d116518 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -160,6 +160,13 @@ void zmq::session_t::process_plug () 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: // 1. Owner object already asked us to terminate. // 2. The pipes were already attached to the session. |