You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2022/06/13 17:15:28 UTC

[impala] 05/05: IMPALA-11343: Override isOpen to avoid thrift bug

This is an automated email from the ASF dual-hosted git repository.

joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 1285fc95ad237f18ff46f5c1d259e004058bbd6e
Author: Michael Smith <mi...@cloudera.com>
AuthorDate: Wed Jun 8 15:11:27 2022 -0700

    IMPALA-11343: Override isOpen to avoid thrift bug
    
    Overrides isOpen on TSSLSocket to work around THRIFT-5595.
    
    Change-Id: Iff9dfb3aaf578a7dbcedd3ca8e1478a5ecb958c3
    Reviewed-on: http://gerrit.cloudera.org:8080/18603
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
    Reviewed-by: Joe McDonnell <jo...@cloudera.com>
---
 shell/TSSLSocketWithWildcardSAN.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/shell/TSSLSocketWithWildcardSAN.py b/shell/TSSLSocketWithWildcardSAN.py
index 8f5b53ee0..95998711e 100755
--- a/shell/TSSLSocketWithWildcardSAN.py
+++ b/shell/TSSLSocketWithWildcardSAN.py
@@ -55,6 +55,10 @@ class TSSLSocketWithWildcardSAN(TSSLSocket.TSSLSocket):
                                    ca_certs=ca_certs, unix_socket=unix_socket,
                                    ssl_version=ssl.PROTOCOL_SSLv23)
 
+  # THRIFT-5595: override TSocket.isOpen because it's broken for TSSLSocket
+  def isOpen(self):
+    return self.handle is not None
+
   def _validate_cert(self):
     cert = self.handle.getpeercert()
     self.peercert = cert