mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-01 03:56:21 +02:00
bump some timeouts
This commit is contained in:
parent
34ef90d1ba
commit
bcf8436c68
@ -163,7 +163,7 @@ def handle(self):
|
||||
protocol = websockets.ServerProtocol()
|
||||
connection = websockets.sync.server.ServerConnection(socket=self.request, protocol=protocol, close_timeout=10)
|
||||
try:
|
||||
connection.handshake()
|
||||
connection.handshake(timeout=5.0)
|
||||
for message in connection:
|
||||
if message == 'proxy_info':
|
||||
connection.send(json.dumps(self.proxy_info))
|
||||
@ -256,7 +256,7 @@ class HTTPProxyTestContext(abc.ABC):
|
||||
|
||||
def http_server(self, server_class, *args, **kwargs):
|
||||
server = proxy_server(server_class, self.REQUEST_HANDLER_CLASS, *args, **kwargs)
|
||||
time.sleep(1) # ensure server is up
|
||||
time.sleep(1)
|
||||
return server
|
||||
|
||||
@abc.abstractmethod
|
||||
|
@ -227,7 +227,7 @@ def _send(self, request):
|
||||
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