Merge pull request #1559 from croneter/fix-websocket

Websocket Fix AttributeError: 'NoneType' object has no attribute 'is_ssl'
This commit is contained in:
croneter 2021-07-25 11:22:12 +02:00 committed by GitHub
commit 4f75502a8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)