mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-10-27 11:06:56 +09:00
[rh:websockets] Support websockets 14.0+ (#11616)
Authored by: coletdjnz
This commit is contained in:
1 parent
e0f1ae813b
commit
c7316373c0
2 files changed
+4
-2
No files matched your search
+3
-1
@@ -216,7 +216,9 @@ class SocksWebSocketTestRequestHandler(SocksTestRequestHandler):
|
||||
protocol = websockets.ServerProtocol()
|
||||
connection = websockets.sync.server.ServerConnection(socket=self.request, protocol=protocol, close_timeout=0)
|
||||
connection.handshake()
|
||||
connection.send(json.dumps(self.socks_info))
|
||||
for message in connection:
|
||||
if message == 'socks_info':
|
||||
connection.send(json.dumps(self.socks_info))
|
||||
connection.close()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user