Skip to content

Bound the update check's network calls with timeouts - #748

Open
kasnder wants to merge 1 commit into
masterfrom
fix/update-check-timeout
Open

Bound the update check's network calls with timeouts#748
kasnder wants to merge 1 commit into
masterfrom
fix/update-check-timeout

Conversation

@kasnder

@kasnder kasnder commented Aug 21, 2026

Copy link
Copy Markdown
Member

checkUpdate() runs synchronously on the command handler thread inside the 30s command wakelock, twice a day (house-holding, sideloaded installs). Its HttpsURLConnection had no connect/read timeouts, so a hung network could stall the command queue for the OS default TCP timeout and hold a wakelock meanwhile.

Adds UPDATE_CHECK_TIMEOUT_MS = 10_000 applied to both connect and read. Verified with ./gradlew :app:compileGithubDebugJavaWithJavac.

checkUpdate() runs synchronously on the command handler thread inside the 30s command wakelock, twice a day (house-holding, sideloaded installs). The HttpsURLConnection had no connect/read timeouts, so a hung network could stall the command queue for the OS default timeout and hold a wakelock meanwhile. Give it 10s bounds on both.
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