Browse Source

HUE-7456 [core] Do not retry Thrift call on read operation timed out from ssl.SSLError

Romain Rigaux 8 years ago
parent
commit
8f98962
1 changed files with 2 additions and 1 deletions
  1. 2 1
      desktop/core/src/desktop/lib/thrift_util.py

+ 2 - 1
desktop/core/src/desktop/lib/thrift_util.py

@@ -43,6 +43,7 @@ from desktop.lib.thrift_.TSSLSocketWithWildcardSAN import TSSLSocketWithWildcard
 from desktop.lib.thrift_sasl import TSaslClientTransport
 from desktop.lib.exceptions import StructuredException, StructuredThriftTransportException
 
+
 # The maximum depth that we will recurse through a "jsonable" structure
 # while converting to thrift. This prevents us from infinite recursion
 # in the case of circular references.
@@ -465,7 +466,7 @@ class SuperClient(object):
           raise
         self.transport.close()
 
-        if isinstance(e, socket.timeout):
+        if isinstance(e, socket.timeout) or 'read operation timed out' in str(e): # Can come from ssl.SSLError
           logging.warn("Not retrying thrift call %s due to socket timeout" % attr)
           raise
         else: