소스 검색

Fix missing shielding

Lidi Zheng 6 년 전
부모
커밋
9aeefc3691
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi

+ 1 - 1
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