mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-01 03:56:21 +02:00
always use WebSocketsSSLTransport if available
this ensures it is used for both sockets in TLS-in-TLS
This commit is contained in:
parent
1b96519a35
commit
101d9f53b4
@ -265,6 +265,6 @@ def __init__(self, ssl_context: ssl.SSLContext):
|
||||
self.ssl_context = ssl_context
|
||||
|
||||
def wrap_socket(self, sock, server_hostname=None):
|
||||
if isinstance(sock, ssl.SSLSocket):
|
||||
if isinstance(sock, ssl.SSLSocket) or WebsocketsSSLTransport:
|
||||
return WebsocketsSSLTransport(sock, self.ssl_context, server_hostname=server_hostname)
|
||||
return self.ssl_context.wrap_socket(sock, server_hostname=server_hostname)
|
||||
|
Loading…
Reference in New Issue
Block a user