Commit aec989fb authored by shripchenko's avatar shripchenko

small refactoring

parent 51750a7d
...@@ -40,14 +40,14 @@ void zmq::dealer_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) ...@@ -40,14 +40,14 @@ void zmq::dealer_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_)
zmq_assert (pipe_); zmq_assert (pipe_);
if (probe_new_peers) { if (probe_new_peers) {
int rc, ok; int rc;
msg_t probe_msg_; msg_t probe_msg_;
rc = probe_msg_.init (); rc = probe_msg_.init ();
errno_assert (rc == 0); errno_assert (rc == 0);
ok = pipe_->write (&probe_msg_); rc = pipe_->write (&probe_msg_);
zmq_assert (ok); zmq_assert (rc);
pipe_->flush (); pipe_->flush ();
rc = probe_msg_.close (); rc = probe_msg_.close ();
......
...@@ -404,15 +404,12 @@ bool zmq::router_t::identify_peer (pipe_t *pipe_) ...@@ -404,15 +404,12 @@ bool zmq::router_t::identify_peer (pipe_t *pipe_)
rc = probe_msg_.init (); rc = probe_msg_.init ();
errno_assert (rc == 0); errno_assert (rc == 0);
ok = pipe_->write (&probe_msg_); rc = pipe_->write (&probe_msg_);
zmq_assert (rc);
pipe_->flush (); pipe_->flush ();
rc = probe_msg_.close (); rc = probe_msg_.close ();
errno_assert (rc == 0); errno_assert (rc == 0);
// Ignore not probed peers
if (!ok)
return false;
} }
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment