Repository navigation
Stop waiting for an internet connection after 30 seconds - #5487
Merged
Gabriel Dufresne (GabrielDuf) merged 2 commits intoOct 8, 2026
Merged
Gabriel Dufresne (GabrielDuf) merged 2 commits into
Gabriel Dufresne (GabrielDuf) merged 2 commits into
Conversation
Package loading waited for the system to report internet access with no limit, so a wrong answer from the system left the app on "Loading packages" for good. The wait now gives up after 30 seconds and goes on. A successful request to the connectivity test page also ends it at once, which covers a stale system answer. The page text is checked so that a captive portal answering 200 does not count as internet access. Co-authored-by: Zeroes1 <11919060+Zeroes1@users.noreply.github.com>
Gabriel Dufresne (GabrielDuf)
requested changes
Oct 8, 2026
Gabriel Dufresne (GabrielDuf)
left a comment
Contributor
There was a problem hiding this comment.
Before I approve, could you address the inline comment about DNS stalls stretching the timeout? Either a hard limit on the request or a note in the doc comment is fine. The rest looks good to me.
The check now sends its request with SendAsync and stops waiting for it at the time limit, so it returns on time even if the request does not stop when HttpClient.Timeout fires. The request is then left to end on its own. Added a test with a request that ignores cancellation.
Gabriel Dufresne (GabrielDuf)
approved these changes
Oct 8, 2026
Gabriel Dufresne (GabrielDuf)
merged commit Oct 8, 2026
9bfbe4b
into
Devolutions:main
5 checks passed
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.
If the same issue can be reproduced outside UniGetUI with the relevant package manager or with the package itself, please report it there first. UniGetUI should only be used to track issues that are specific to UniGetUI's behavior or integration.
UniGetUI waited for the system to report internet access with no time limit, so loading hung when the system kept saying there was no internet.
This picks up #5128 by Zeroes1. The wait now stops after 30 seconds and loading goes on, and a successful HTTP check ends it sooner. It swaps the obsolete
WebRequestforHttpClient, useswww.msftconnecttest.com(the bare domain doesn't resolve), and checks the page text so a captive portal's 200 page doesn't count.Added
ConnectivityWaitTests(dotnet test src/UniGetUI.Core.Tools.Tests). With no network interface,WaitForInternetConnection()used to hang and now returns after 30 seconds. The Windows-only check compiles but wasn't run.Relates to #3669
I used Claude/Codex to assist with preparing, checking and double-checking this change.
Co-authored-by: Zeroes1 11919060+Zeroes1@users.noreply.github.com