mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-06 13:21:10 +01:00
Issue #1382: Do not send data to backend when there are no listeners (+ tests)
This commit is contained in:
@@ -159,14 +159,16 @@ int zmq::proxy (
|
||||
}
|
||||
// Process a request
|
||||
if (state == active
|
||||
&& items [0].revents & ZMQ_POLLIN) {
|
||||
&& items [0].revents & ZMQ_POLLIN
|
||||
&& items [1].revents & ZMQ_POLLOUT) {
|
||||
rc = forward(frontend_, backend_, capture_,msg);
|
||||
if (unlikely (rc < 0))
|
||||
return -1;
|
||||
}
|
||||
// Process a reply
|
||||
if (state == active
|
||||
&& items [1].revents & ZMQ_POLLIN) {
|
||||
&& items [1].revents & ZMQ_POLLIN
|
||||
&& items [0].revents & ZMQ_POLLOUT) {
|
||||
rc = forward(backend_, frontend_, capture_,msg);
|
||||
if (unlikely (rc < 0))
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user