Adding comment about `del` about #17258

pull/17266/head
Lidi Zheng 6 years ago
parent 53476eced4
commit d75abb6663
  1. 2
      src/python/grpcio/grpc/_server.py

@ -828,6 +828,8 @@ class _Server(grpc.Server):
return _stop(self._state, grace)
def __del__(self):
# TODO(lidiz): Depends on issue #17258 which is not solved yet
# The `_state` may not exist when object get deconstructed
if hasattr(self, '_state'):
_stop(self._state, None)
del self._state

Loading…
Cancel
Save