Websocket Fix AttributeError: 'NoneType' object has no attribute is_ssl

This commit is contained in:
croneter 2021-07-25 11:17:07 +02:00
parent 1bd1da9f5a
commit 295f403c64
1 changed files with 4 additions and 1 deletions

View File

@ -197,7 +197,10 @@ class WebSocket(object):
return None
def is_ssl(self):
return isinstance(self.sock, ssl.SSLSocket)
try:
return isinstance(self.sock, ssl.SSLSocket)
except:
return False
headers = property(getheaders)