浏览代码

Explicitly pointout KeyboardInterrupt and SystemExit can pass freely

Lidi Zheng 5 年之前
父节点
当前提交
1dc2679d6d
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi

+ 4 - 0
src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi

@@ -270,6 +270,10 @@ async def _handle_exceptions(RPCState rpc_state, object rpc_coro, object loop):
                     'Abort error unexpectedly suppressed: %s',
                     traceback.format_exception(rpc_state.abort_exception)
                 )
+    except KeyboardInterrupt:
+        raise
+    except SystemExit:
+        raise
     except Exception as e:
         _LOGGER.exception(e)
         if not rpc_state.status_sent and rpc_state.server._status != AIO_SERVER_STATUS_STOPPED: