From 5cf41f342475ad24722620b3101c909a1f879222 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Thu, 6 Feb 2020 15:31:30 -0800 Subject: [PATCH] Revert the changes in _channel.py --- src/python/grpcio/grpc/experimental/aio/_channel.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/python/grpcio/grpc/experimental/aio/_channel.py b/src/python/grpcio/grpc/experimental/aio/_channel.py index 536206241fe..7035dd6c35e 100644 --- a/src/python/grpcio/grpc/experimental/aio/_channel.py +++ b/src/python/grpcio/grpc/experimental/aio/_channel.py @@ -395,10 +395,9 @@ class Channel: # A new set is created acting as a shallow copy because # when cancellation happens the calls are automatically # removed from the originally set. - calls = WeakSet(self._ongoing_calls.calls) + calls = WeakSet(data=self._ongoing_calls.calls) for call in calls: - if call is not None: - call.cancel() + call.cancel() self._channel.close()