Skip to content

Commit

Permalink
[rh:websockets] Support websockets 14.0+ (yt-dlp#11616)
Browse files Browse the repository at this point in the history
Authored by: coletdjnz
  • Loading branch information
coletdjnz authored Nov 23, 2024
1 parent e0f1ae8 commit c731637
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ default = [
"pycryptodomex",
"requests>=2.32.2,<3",
"urllib3>=1.26.17,<3",
"websockets>=13.0,<14",
"websockets>=13.0",
]
curl-cffi = [
"curl-cffi==0.5.10; os_name=='nt' and implementation_name=='cpython'",
Expand Down
4 changes: 3 additions & 1 deletion test/test_socks.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ def handle(self):
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()


Expand Down

0 comments on commit c731637

Please sign in to comment.