From 01531f74ed5e7fcbd2c5d4302ff27c8627af9284 Mon Sep 17 00:00:00 2001 From: felix Date: Mon, 14 Oct 2019 22:44:07 +0800 Subject: [PATCH] fix(stream-call): hungry mode to receive responses --- gnes/service/frontend.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnes/service/frontend.py b/gnes/service/frontend.py index f88b2128..db7295a7 100644 --- a/gnes/service/frontend.py +++ b/gnes/service/frontend.py @@ -128,6 +128,11 @@ def get_response(num_recv, blocked=False): self.pending_request -= 1 yield self.remove_envelope(msg) + while zmq_client.receiver.poll(5): + msg = zmq_client.recv_message(**self.send_recv_kwargs) + self.pending_request -= 1 + yield self.remove_envelope(msg) + with self.zmq_context as zmq_client: for request in request_iterator: