Skip to content

fix: implement connection timeout limits and launch splash cut-off#107

Merged
Michael-128 merged 2 commits into
mainfrom
fix/connection-stability
Jul 6, 2026
Merged

fix: implement connection timeout limits and launch splash cut-off#107
Michael-128 merged 2 commits into
mainfrom
fix/connection-stability

Conversation

@Michael-128

Copy link
Copy Markdown
Owner

Description

Implements network request timeout limits and prevents the app launch splash screen from hanging indefinitely when the active server is offline or slow.

Key Changes

  • Global Request Timeout: Configures the default URLSession inside NetworkClient to use a 15-second request and resource timeout interval (down from the default 60 seconds).
  • App Launch Splash Cut-off: Races the startup connection task against a 3-second timer using withThrowingTaskGroup. If connection fails to establish within 3 seconds, the login
    task is cancelled and the app falls back to the Server List rather than freezing on the logo screen.
  • Telemetry Session Recovery: Catches 401 Unauthorized responses in the background telemetry loop to trigger a silent background re-authentication attempt.
  • Unit Tests: Adds testSendRequest_Timeout and testTaskGroup_TimeoutRace to NetworkClientTests to verify request cancellation and timeout propagation.

@Michael-128 Michael-128 merged commit e3dc5d3 into main Jul 6, 2026
1 check passed
@Michael-128 Michael-128 deleted the fix/connection-stability branch July 6, 2026 19:00
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