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
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)