mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-14 21:15:06 +00:00
feat(remote): keep slow remote session requests alive with a heartbeat
Titles, tracks and licence stream a newline every 30s until the body is ready, so a slow service outlasts the client timeout and proxy idle limits; add a per-server timeout.
This commit is contained in:
@@ -6,6 +6,7 @@ the first PSSH alone and so handed one track another track's narrower key set, a
|
||||
with no readable PSSH told the client nothing.
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
import base64
|
||||
import json
|
||||
from types import SimpleNamespace
|
||||
@@ -77,6 +78,7 @@ async def test_single_track_path_keeps_siblings(env, monkeypatch):
|
||||
drm=[_FakePlayReady(pssh_b64=PSSH, kid=KID_A), _FakePlayReady(pssh_b64=PSSH, kid=KID_B)],
|
||||
)
|
||||
session = SimpleNamespace(
|
||||
lock=asyncio.Lock(),
|
||||
service_tag="EX",
|
||||
service_instance=SimpleNamespace(),
|
||||
served_keys={},
|
||||
@@ -111,6 +113,7 @@ async def test_batch_cache_does_not_starve_second_track(env, monkeypatch):
|
||||
)
|
||||
tracks = {"vid": vid, "aud": aud}
|
||||
session = SimpleNamespace(
|
||||
lock=asyncio.Lock(),
|
||||
service_tag="EX",
|
||||
service_instance=SimpleNamespace(),
|
||||
served_keys={},
|
||||
@@ -142,6 +145,7 @@ async def test_no_pssh_tells_the_client_why(env, monkeypatch):
|
||||
buf = SessionLogBuffer()
|
||||
track = SimpleNamespace(id="vid", drm=[object()])
|
||||
session = SimpleNamespace(
|
||||
lock=asyncio.Lock(),
|
||||
service_tag="EX",
|
||||
service_instance=SimpleNamespace(),
|
||||
served_keys={},
|
||||
|
||||
Reference in New Issue
Block a user