Skip to content

Fix account stuck in "Connecting" state after network switch - #969

Merged
TheOneRing merged 1 commit into
opencloud-eu:mainfrom
paolostivanin:fix/network-switch-recovery
Jul 9, 2026
Merged

Fix account stuck in "Connecting" state after network switch#969
TheOneRing merged 1 commit into
opencloud-eu:mainfrom
paolostivanin:fix/network-switch-recovery

Conversation

@paolostivanin

Copy link
Copy Markdown
Contributor

When switching networks (e.g. WiFi → mobile hotspot), a running ConnectionValidator's HTTP request could hang on the dead socket. The guard in checkConnectivity() would then block all subsequent reconnection attempts, leaving the account permanently stuck in "Connecting".

Two fixes:

  • Abort any stale ConnectionValidator when reachability or captive-portal state changes, so a fresh validation can start immediately, and clear the access manager's connection cache so new requests open fresh sockets on the new interface.
  • Add a 60-second hard timeout to ConnectionValidator to abort hung requests as a safety net.

Split out of #858 so it can be reviewed independently.

Tested on openSUSE Tumbleweed x86_64.

When switching networks (e.g. WiFi to mobile hotspot), the running
ConnectionValidator's HTTP request could hang on the dead socket.
The guard in checkConnectivity() would then block all subsequent
reconnection attempts, leaving the account permanently stuck.

Two fixes:
- Abort any stale ConnectionValidator when reachability or captive
  portal state changes, so a fresh validation can start immediately.
- Add a 60-second hard timeout to ConnectionValidator to abort hung
  requests as a safety net.
@TheOneRing
TheOneRing force-pushed the fix/network-switch-recovery branch from a8ec461 to d009495 Compare July 9, 2026 08:56

@TheOneRing TheOneRing left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting find, thank you for your contribution!

@TheOneRing
TheOneRing merged commit 619086b into opencloud-eu:main Jul 9, 2026
12 checks passed
@openclouders openclouders mentioned this pull request Jul 9, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants