Set linger to 0 on writer

This commit is contained in:
2020-04-22 11:55:20 +02:00
parent 193418a404
commit e588264dfc
+6 -2
View File
@@ -41,8 +41,12 @@ int main (int argc, char *argv[])
}
int rcvhwm = 10000;
int status = zmq_setsockopt(socket, ZMQ_RCVHWM, &rcvhwm, sizeof(rcvhwm));
if (status != 0) {
if (zmq_setsockopt(socket, ZMQ_RCVHWM, &rcvhwm, sizeof(rcvhwm)) != 0) {
throw runtime_error(strerror (errno));
}
int linger = 0;
if (zmq_setsockopt(socket, ZMQ_LINGER, &linger, sizeof(linger)) != 0) {
throw runtime_error(strerror (errno));
}