mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-10-21 08:26:35 +09:00
[test:websockets] Update server hang workaround (#17718)
Authored by: doe1080
This commit is contained in:
1 parent
39b31b2755
commit
9dd5e68cd7
1 file changed
+5
-1
@@ -130,7 +130,11 @@ def ws_validate_and_send(rh, req):
|
||||
try:
|
||||
return rh.send(req)
|
||||
except TransportError as e:
|
||||
if i < (max_tries - 1) and 'connection closed during handshake' in str(e):
|
||||
if i < (max_tries - 1) and (
|
||||
'connection closed during handshake' in str(e)
|
||||
or (isinstance(e.cause, websockets.exceptions.InvalidMessage)
|
||||
and isinstance(e.cause.__cause__, EOFError))
|
||||
):
|
||||
# websockets server sometimes hangs on new connections
|
||||
continue
|
||||
raise
|
||||
|
||||
Reference in new issue
Block a user