Skip to content

Commit b5b0896

Browse files
committed
zmq client cleanup
1 parent 83399b4 commit b5b0896

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ConsumerStats.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,12 @@ class ConsumerStats : public Consumer
258258
throw __LINE__;
259259
}
260260

261+
const int cfgZmqLinger = 1000;
262+
zmqError = zmq_setsockopt(zmqHandle, ZMQ_LINGER, (void*)&cfgZmqLinger, sizeof(cfgZmqLinger)); // close timeout
263+
if (zmqError) {
264+
throw __LINE__;
265+
}
266+
261267
zmqError = zmq_connect(zmqHandle, cfgZmqPublishAddress.c_str());
262268
if (zmqError) {
263269
throw __LINE__;

0 commit comments

Comments
 (0)