Skip to content

Commit 3a16259

Browse files
committed
[fix] pzmq close wait
1 parent 423427d commit 3a16259

File tree

1 file changed

+2
-0
lines changed
  • ext_components/StackFlow/stackflow

1 file changed

+2
-0
lines changed

ext_components/StackFlow/stackflow/pzmq.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,8 @@ class pzmq {
394394
}
395395
void close_zmq()
396396
{
397+
int linger = 0;
398+
zmq_setsockopt(zmq_socket_, ZMQ_LINGER, &linger, sizeof(linger));
397399
zmq_close(zmq_socket_);
398400
zmq_ctx_destroy(zmq_ctx_);
399401
if ((mode_ == ZMQ_PUB) || (mode_ == ZMQ_PULL) || (mode_ == ZMQ_RPC_FUN)) {

0 commit comments

Comments
 (0)