THRIFT-5595: Handle peek request error with SSLSocket

The update to TSocket in 01d53f483a7531ad4899b522060e8913dca309fb errors
for TSSLSocket with
```
ValueError: non-zero flags not allowed in calls to recv() on <class 'ssl.SSLSocket'>
```
Handles ValueError from ssl.SSLSocket to fix isOpen when using
TSSLSocket.
diff --git a/lib/py/test/test_socket.py b/lib/py/test/test_socket.py
index 95124dc..b732653 100644
--- a/lib/py/test/test_socket.py
+++ b/lib/py/test/test_socket.py
@@ -25,6 +25,7 @@
             acc.start()
 
             sock = TSocket(host="localhost", port=acc.port)
+            self.assertFalse(sock.isOpen())
             sock.open()
             sock.setTimeout(timeout)