mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-19 09:53:51 +00:00
Improve error reporting in a minor way
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
parent
8b7ac4c2a9
commit
9fb9fea633
@ -59,7 +59,7 @@ zmq::tcp_connecter_t::tcp_connecter_t (class io_thread_t *io_thread_,
|
||||
// TODO: set_addess should be called separately, so that the error
|
||||
// can be propagated.
|
||||
int rc = set_address (address_);
|
||||
zmq_assert (rc == 0);
|
||||
errno_assert (rc == 0);
|
||||
}
|
||||
|
||||
zmq::tcp_connecter_t::~tcp_connecter_t ()
|
||||
|
@ -130,7 +130,7 @@ int zmq::xrep_t::xsend (msg_t *msg_, int flags_)
|
||||
|
||||
// Find the pipe associated with the peer ID stored in the prefix.
|
||||
// If there's no such pipe just silently ignore the message.
|
||||
zmq_assert (msg_->size () == 4);
|
||||
if (msg_->size () == 4) {
|
||||
uint32_t peer_id = get_uint32 ((unsigned char*) msg_->data ());
|
||||
outpipes_t::iterator it = outpipes.find (peer_id);
|
||||
|
||||
@ -148,6 +148,7 @@ int zmq::xrep_t::xsend (msg_t *msg_, int flags_)
|
||||
errno_assert (rc == 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int rc = msg_->close ();
|
||||
errno_assert (rc == 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user