Problem: zap_connect() asserts on write fail (yet returns fail codes).

This commit is contained in:
evoskuil 2017-03-29 14:31:21 -07:00
parent a0ccdc866e
commit 29a5c98d83

View File

@ -353,9 +353,10 @@ int zmq::session_base_t::zap_connect ()
rc = id.init ();
errno_assert (rc == 0);
id.set_flags (msg_t::identity);
bool ok = zap_pipe->write (&id);
zmq_assert (ok);
zap_pipe->flush ();
if (zap_pipe->write (&id))
zap_pipe->flush ();
else
return -1;
}
return 0;