Browse Source

Explicitly pointout KeyboardInterrupt and SystemExit can pass freely

Lidi Zheng 5 years ago
parent
commit
1dc2679d6d
1 changed files with 4 additions and 0 deletions
  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: