Implemented _abort method on ServicerContext

This acquires a lock from the _condition member of the context's _rpc
and then aborts the _rpc directly
pull/20077/head
Neeraj Kashyap 5 years ago
parent ff8354ed5e
commit b804ce974a
  1. 3
      src/python/grpcio_testing/grpc_testing/_server/_servicer_context.py

@ -74,7 +74,8 @@ class ServicerContext(grpc.ServicerContext):
_common.fuss_with_metadata(trailing_metadata))
def abort(self, code, details):
raise NotImplementedError()
self._rpc._condition.acquire()
self._rpc._abort(code, details)
def abort_with_status(self, status):
raise NotImplementedError()

Loading…
Cancel
Save