diff options
author | Michael Lumish <mlumish@google.com> | 2017-05-30 13:53:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-30 13:53:40 -0700 |
commit | 9baf4b19f0e4133dce8e4083fdae4349f6f034da (patch) | |
tree | b822a700260cfac9bcbcc6cfad709ce94af87e3c /src/python/grpcio | |
parent | 4ff23545807802f177b2e90c4c4517d8c2cb224e (diff) | |
parent | 4ff54fa8af36cb4216d4064272597fd28108b31a (diff) |
Merge pull request #11309 from murgatroid99/master_1.3.x_upmerge
Master 1.3.x upmerge
Diffstat (limited to 'src/python/grpcio')
-rw-r--r-- | src/python/grpcio/grpc/_channel.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py index 4316449ac6..012ed8ec81 100644 --- a/src/python/grpcio/grpc/_channel.py +++ b/src/python/grpcio/grpc/_channel.py @@ -786,7 +786,7 @@ def _channel_managed_call_management(state): class _ChannelConnectivityState(object): def __init__(self, channel): - self.lock = threading.Lock() + self.lock = threading.RLock() self.channel = channel self.polling = False self.connectivity = None @@ -926,6 +926,11 @@ class Channel(grpc.Channel): self._call_state = _ChannelCallState(self._channel) self._connectivity_state = _ChannelConnectivityState(self._channel) + # TODO(https://github.com/grpc/grpc/issues/9884) + # Temporary work around UNAVAILABLE issues + # Remove this once c-core has retry support + _subscribe(self._connectivity_state, lambda *args: None, None) + def subscribe(self, callback, try_to_connect=None): _subscribe(self._connectivity_state, callback, try_to_connect) |