mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-09 12:50:23 -05:00
what about this?
This commit is contained in:
parent
6c585b9de8
commit
4b3fd5f833
1 changed files with 2 additions and 2 deletions
|
@ -160,7 +160,7 @@ def handle(self):
|
||||||
import websockets.sync.server
|
import websockets.sync.server
|
||||||
self.request.settimeout(None)
|
self.request.settimeout(None)
|
||||||
protocol = websockets.ServerProtocol()
|
protocol = websockets.ServerProtocol()
|
||||||
connection = websockets.sync.server.ServerConnection(socket=self.request, protocol=protocol, close_timeout=0)
|
connection = websockets.sync.server.ServerConnection(socket=self.request, protocol=protocol, close_timeout=10)
|
||||||
connection.handshake()
|
connection.handshake()
|
||||||
for message in connection:
|
for message in connection:
|
||||||
if message == 'proxy_info':
|
if message == 'proxy_info':
|
||||||
|
@ -241,7 +241,7 @@ def proxy_server(proxy_server_class, request_handler, bind_ip=None, **proxy_serv
|
||||||
yield f'{bind_address}:{server_port}'
|
yield f'{bind_address}:{server_port}'
|
||||||
finally:
|
finally:
|
||||||
server.shutdown()
|
server.shutdown()
|
||||||
server.server_close()
|
server_thread.join()
|
||||||
|
|
||||||
|
|
||||||
class HTTPProxyTestContext(abc.ABC):
|
class HTTPProxyTestContext(abc.ABC):
|
||||||
|
|
Loading…
Reference in a new issue