From 9aeefc3691642d744123e579eb038338a3eea5f8 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Thu, 31 Oct 2019 13:36:38 -0700 Subject: [PATCH] Fix missing shielding --- src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi index 0dca070e933..ef7160a3059 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi @@ -410,7 +410,7 @@ cdef class AioServer: await self._shutdown_completed else: try: - await asyncio.wait_for(self._shutdown_completed, timeout) + await asyncio.wait_for(asyncio.shield(self._shutdown_completed), timeout) except asyncio.TimeoutError: if self._crash_exception is not None: raise self._crash_exception