Stop the ctrl-c spam

pull/24718/head
Lidi Zheng 4 years ago
parent cc03415b78
commit a012edf10f
  1. 3
      src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi

@ -780,7 +780,6 @@ cdef CallbackFailureHandler SERVER_SHUTDOWN_FAILURE_HANDLER = CallbackFailureHan
None,
InternalError)
cdef class AioServer:
def __init__(self, loop, thread_pool, generic_handlers, interceptors,
@ -884,6 +883,8 @@ cdef class AioServer:
def _serving_task_crash_handler(self, object task):
"""Shutdown the server immediately if unexpectedly exited."""
if task.cancelled():
return
if task.exception() is None:
return
if self._status != AIO_SERVER_STATUS_STOPPING:

Loading…
Cancel
Save