Repository navigation
Conversation
An HTTP/2 connection that the router silently dropped while a video played stayed in the pool of the extractor's OkHttpClient, and every retry of the next request timed out on it (endless loading). Idle connections are now closed after 20 s, HTTP/2 connections are pinged, and after an IOException the pool is dropped and the request is repeated once on a new connection. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fetching the next video sometimes never finishes (endless loading wheel). The reason: the
OkHttpClientof the extractor keeps an HTTP/2 connection in its pool that the router silently dropped while the previous video was playing. The request times out (10 s) on it, and all retries reuse the same dead connection. It happened reliably after a video ended on Wi-Fi.Fix
In
NewPipeDownloaderImpl: idle connections are closed after 20 s, HTTP/2 connections are pinged every 15 s, and after anIOExceptionthe whole pool is dropped and the request is repeated once on a new connection.Tested
The log line before the fix:
failed to fetch streams ... SocketTimeoutExceptionthree times in a row; with the fix the next video loads.Disclosure: I know that the contributing guide does not permit AI generated contributions. The code of this PR and this description were written with the help of an AI assistant (Claude Code, see the
Co-Authored-Bytrailer of the commit). I did not hide this. I use the app daily, I reviewed the behavior and tested the change on my device (Pixel 8a, GrapheneOS / Android 16, built from currentmaster). Please feel free to close the PR if it is not acceptable, or to take it only as a bug report with a possible fix.