change assert to FC_ASSERT and handle wrong number of msgs
This commit is contained in:
parent
0bc7801da5
commit
7dca93071d
1 changed files with 5 additions and 2 deletions
|
|
@ -872,8 +872,11 @@ std::vector<zmq::message_t> zmq_listener::receive_multipart() {
|
|||
std::vector<zmq::message_t> msgs;
|
||||
|
||||
auto res = zmq::recv_multipart(socket, std::back_inserter(msgs));
|
||||
assert(res);
|
||||
assert(3 == *res);
|
||||
FC_ASSERT(res);
|
||||
if (3 != *res) {
|
||||
elog("zmq::recv_multipart returned: ${res}", ("res", *res));
|
||||
throw zmq::error_t();
|
||||
}
|
||||
|
||||
return msgs;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue