aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2017-05-25 15:13:27 -0700
committerGravatar murgatroid99 <mlumish@google.com>2017-05-25 15:13:27 -0700
commitc18b9069cd37083f34e8e3c1601eb20944914ee5 (patch)
tree43943d620ecb7a984694766a273823fd34eebad5 /src/python/grpcio
parent0a94f3c8ab55dfd12c14058d57f33121c8d6c411 (diff)
parent3410c8d7dc86fe7778d6795340d9792acb1b912b (diff)
Merge remote-tracking branch 'upstream/v1.3.x' into master_1.3.x_upmerge
Diffstat (limited to 'src/python/grpcio')
-rw-r--r--src/python/grpcio/grpc/_channel.py7
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)