Fix small streamengine issue w/ term and handshake

Also tidy up monitor test a little.
This commit is contained in:
Ian Barber
2013-06-22 10:58:16 +01:00
parent cabf4e658f
commit f4c51db842
2 changed files with 19 additions and 10 deletions

View File

@@ -642,6 +642,12 @@ void zmq::stream_engine_t::mechanism_ready ()
msg_t identity;
mechanism->peer_identity (&identity);
const int rc = session->push_msg (&identity);
if (rc == -1 && errno == EAGAIN) {
// If the write is failing at this stage with
// an EAGAIN the pipe must be being shut down,
// so we can just bail out of the identity set.
return;
}
errno_assert (rc == 0);
}