mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-01 03:56:21 +02:00
revert
This commit is contained in:
parent
44da2e1323
commit
8c0d5041df
@ -204,18 +204,15 @@ def _send(self, request):
|
||||
ssl_context = WebsocketsSSLContext(self._make_sslcontext())
|
||||
else:
|
||||
ssl_context = self._make_sslcontext()
|
||||
sock = self._make_sock(proxy, request.url, timeout)
|
||||
# We need to reset the timeout to not conflict with websocket handshake
|
||||
sock.settimeout(None)
|
||||
try:
|
||||
conn = websockets.sync.client.connect(
|
||||
sock=sock,
|
||||
sock=self._make_sock(proxy, request.url, timeout),
|
||||
uri=request.url,
|
||||
additional_headers=headers,
|
||||
open_timeout=timeout,
|
||||
user_agent_header=None,
|
||||
ssl_context=ssl_context,
|
||||
close_timeout=0, # not ideal, but prevents yt-dlp hanging
|
||||
close_timeout=0.1, # not ideal, but prevents yt-dlp hanging
|
||||
)
|
||||
return WebsocketsResponseAdapter(conn, url=request.url)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user