Problem: HEARTBEAT command breaks REQ connection

Solution: ignore command messages in the REQ session to avoid
disrupting the state machine.
Commands are handled by the engine before handing off to the session.
This commit is contained in:
Luca Boccassi 2018-04-28 12:35:36 +01:00
parent cdf5566108
commit cae6434345

View File

@ -285,6 +285,11 @@ zmq::req_session_t::~req_session_t ()
int zmq::req_session_t::push_msg (msg_t *msg_)
{
// Ignore commands, they are processed by the engine and should not
// affect the state machine.
if (unlikely (msg_->flags () & msg_t::command))
return 0;
switch (state) {
case bottom:
if (msg_->flags () == msg_t::more) {