mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-29 04:17:57 +01:00
termination of pipe via delimiter message could stuck when no data were read from the pipe (because connection wasn't active) -- fixed
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user