Skip to content

fix: stream hosts get 6 s to answer before refryt tries a mirror - #39

Merged
gridoe merged 1 commit into
mainfrom
fix/stream-timeouts
Nov 17, 2026
Merged

gridoe merged 1 commit into
mainfrom
fix/stream-timeouts

Conversation

@gridoe

@gridoe gridoe commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Follow-up to #35.

  • The first-byte probe and each proxy range share one deadline, STREAM_DEADLINE, now 6 s instead of 5 s, so a slow but working connection has more room. On 10 real stream URLs a reachable host answered in 0.06–0.75 s, cold.
  • mpv's curl-connect-timeout is 6 s too. The option only exists on mpv built with libcurl (0.42, and the Windows libmpv we bundle), where the default is 30 s per dead host. That's the 30 s in Playback hangs when YouTube assigns a stream node this machine cannot reach #36. Linux's mpv 0.41 ignores it.
  • The README line about mirrors is dropped.

The check before yt-dlp URLs go to mpv stays. It accepted the guest User-Agent on all 10 URLs and adds about 0.1 s, on the under 1% of plays that use yt-dlp.

refryt-resolve: fmt, clippy -D warnings and tests pass with and without native-resolver.

The first-byte probe and each proxy range now share one deadline, 6 s, up
from 5 s, so a slow but working connection has more room. A reachable host
answered in 0.06-0.75 s in testing. mpv's curl-connect-timeout follows it;
it only exists on mpv built with libcurl (0.42 and our Windows libmpv),
where it defaults to 30 s per dead host. The README line about mirrors is
dropped.
@gridoe
gridoe merged commit c3aaeeb into main Nov 17, 2026
3 checks passed
@gridoe
gridoe deleted the fix/stream-timeouts branch November 17, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant