From d02cd7572338165fad697eb1cd02b47731b9e837 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Tue, 27 Aug 2019 12:15:50 +0800 Subject: [PATCH] fix(router): respect num_part when set --- gnes/service/router.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnes/service/router.py b/gnes/service/router.py index 43a7c902..e7e0c527 100644 --- a/gnes/service/router.py +++ b/gnes/service/router.py @@ -31,7 +31,7 @@ def post_init(self): self._pending = defaultdict(list) # type: Dict[str, List] def _is_msg_complete(self, msg: 'gnes_pb2.Message', num_req: int) -> bool: - return (num_req == msg.envelope.num_part[-1]) or \ + return (self.args.num_part is None and num_req == msg.envelope.num_part[-1]) or \ (num_req == self.args.num_part) @handler.register(NotImplementedError)