From 65ba1c9aab957ebc8ee76b73df10b216406cecbc Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Wed, 8 Jan 2020 10:22:39 -0800 Subject: [PATCH] Remove unused function --- .../grpc/_cython/_cygrpc/aio/server.pyx.pxi | 29 ------------------- 1 file changed, 29 deletions(-) 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 ed1a61e46f2..7a49cec3bc9 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi @@ -66,35 +66,6 @@ def _raise_if_aborted(RPCState rpc_state): raise rpc_state.abort_exception -async def _perform_abort(RPCState rpc_state, - grpc_status_code code, - str details, - tuple trailing_metadata, - object loop): - """Perform the abort logic. - - Sends final status to the client, and then set the RPC into corresponding - state. - """ - if rpc_state.abort_exception is not None: - raise RuntimeError('Abort already called!') - else: - # Keeps track of the exception object. After abort happen, the RPC - # should stop execution. However, if users decided to suppress it, it - # could lead to undefined behavior. - rpc_state.abort_exception = AbortError('Locally aborted.') - - rpc_state.status_sent = True - await _send_error_status_from_server( - rpc_state, - code, - details, - trailing_metadata, - rpc_state.metadata_sent, - loop - ) - - cdef class _ServicerContext: cdef RPCState _rpc_state cdef object _loop