Skip to content

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

Merged
kasnder merged 1 commit into
masterfrom
fix/update-check-timeout
Aug 22, 2026
Merged

Bound the update check's network calls with timeouts#748
kasnder merged 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.
@kasnder
kasnder merged commit 64cf296 into master Aug 22, 2026
2 checks passed
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