From a6b731035e5473d4463bcec38f85973ce256e097 Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Thu, 24 Aug 2023 21:42:26 +0000 Subject: [PATCH] Modify the condition that triggers the StopIteration exception --- src/python/grpcio/grpc/_server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py index 425aff8c955..0a4315b4581 100644 --- a/src/python/grpcio/grpc/_server.py +++ b/src/python/grpcio/grpc/_server.py @@ -460,6 +460,7 @@ class _RequestIterator(object): elif ( self._state.request is None and _RECEIVE_MESSAGE_TOKEN not in self._state.due + and _RECEIVE_CLOSE_ON_SERVER_TOKEN not in self._state.due ): raise StopIteration() else: