Closed Alireza67 closed 1 year ago
I figured out if I destroy context before join my proxy thread, blocking on zmq_proxy is going to solve.
The zmq_proxy() function always returns -1 and errno set to ETERM (the ØMQ context associated with either of the specified sockets was terminated).
Is it a safe way? Are there any standard ways?
auto res = zmq_ctx_destroy(ctx); proxy.join();
I think here the safe way is to call shutdown, then join all threads and finally terminate/destroy.
How can stop zmq_proxy in correct way? I tried to implement a design with multiple publishers and multiple subscribers. I used XSUB and XPUB in my code. My code works as I expected but when program wants to close, I face with block on calling zmq_proxy function.