Replay LINGER should be 0 to wait until the writer flushes

This commit is contained in:
2020-05-18 18:12:47 +02:00
parent c478144e96
commit 5e39f65953
+1 -1
View File
@@ -166,7 +166,7 @@ int main (int argc, char *argv[]) {
if (zmq_setsockopt(socket, ZMQ_SNDHWM, &sndhwm, sizeof(sndhwm)) != 0)
throw runtime_error(strerror (errno));
const int linger_ms = -1;
const int linger_ms = 0;
if (zmq_setsockopt(socket, ZMQ_LINGER, &linger_ms, sizeof(linger_ms)) != 0)
throw runtime_error(strerror (errno));