Merge pull request #115 from bluca/linger_fix_backport

Problem: connection might terminate prematurely
This commit is contained in:
Pieter Hintjens 2016-03-30 19:41:34 +02:00
commit 197a9e05e2
2 changed files with 4 additions and 1 deletions

2
NEWS
View File

@ -15,6 +15,8 @@
* Fixed #1850 - detection issues with tweetnacl/libsodium.
* Fixed #1877 - Avoid terminating connections prematurely
0MQ version 4.1.4 stable, released on 2015/12/18
================================================

View File

@ -454,7 +454,8 @@ void zmq::session_base_t::process_term (int linger_)
// TODO: Should this go into pipe_t::terminate ?
// In case there's no engine and there's only delimiter in the
// pipe it wouldn't be ever read. Thus we check for it explicitly.
pipe->check_read ();
if (!engine)
pipe->check_read ();
}
if (zap_pipe != NULL)