Repository: thrift
Updated Branches:
  refs/heads/master 82ae9575c -> 2f03618a6


THRIFT-4274: Catch OSError in TSSLServerSocket.accept()
Client: py

This closes #1321

wrap_socket can raise OSError instead of SSLError when receiving an
invalid connection attempt, which if not caught crashes TSimpleServer
and causes the feature tests to fail.


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/2f03618a
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/2f03618a
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/2f03618a

Branch: refs/heads/master
Commit: 2f03618a6c0a938813ca36e6a2fcd9f517a64ee0
Parents: 82ae957
Author: HÃ¥kon Hitland <hakon.hitl...@zedge.net>
Authored: Mon Jul 31 12:39:52 2017 +0200
Committer: James E. King, III <jk...@apache.org>
Committed: Thu Aug 10 15:39:09 2017 -0400

----------------------------------------------------------------------
 lib/py/src/transport/TSSLSocket.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/2f03618a/lib/py/src/transport/TSSLSocket.py
----------------------------------------------------------------------
diff --git a/lib/py/src/transport/TSSLSocket.py 
b/lib/py/src/transport/TSSLSocket.py
index bf4689a..f85778a 100644
--- a/lib/py/src/transport/TSSLSocket.py
+++ b/lib/py/src/transport/TSSLSocket.py
@@ -368,7 +368,7 @@ class TSSLServerSocket(TSocket.TServerSocket, TSSLBase):
         plain_client, addr = self.handle.accept()
         try:
             client = self._wrap_socket(plain_client)
-        except ssl.SSLError:
+        except (ssl.SSLError, OSError):
             logger.exception('Error while accepting from %s', addr)
             # failed handshake/ssl wrap, close socket to client
             plain_client.close()

Reply via email to