mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-07 17:33:41 +00: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 @@ class WebsocketsSSLContext:
|
||||
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…
x
Reference in New Issue
Block a user