Exchange error reporting for zmq code

This commit is contained in:
2020-05-06 10:31:26 +02:00
parent b31b6cddf9
commit d7497b2eb5
+3 -2
View File
@@ -22,7 +22,7 @@ TEST(LiveRecvModule, basic_interaction) {
int linger = 0;
if (zmq_setsockopt(sockets[i], ZMQ_LINGER, &linger,
sizeof(linger)) != 0) {
throw runtime_error(strerror(errno));
throw runtime_error(zmq_strerror(errno));
}
stringstream ipc_addr;
@@ -30,7 +30,7 @@ TEST(LiveRecvModule, basic_interaction) {
const auto ipc = ipc_addr.str();
if (zmq_bind(sockets[i], ipc.c_str()) != 0) {
throw runtime_error(strerror(errno));
throw runtime_error(zmq_strerror(errno));
}
}
@@ -40,6 +40,7 @@ TEST(LiveRecvModule, basic_interaction) {
ASSERT_EQ(queue.read(), -1);
this_thread::sleep_for(chrono::milliseconds(10000));
for (size_t i = 0; i < n_modules; i++) {
zmq_close(sockets[i]);
}