Skip to content

fix(app): add timeout + cache-control to server validation#1194

Open
leozeli wants to merge 1 commit intoslopus:mainfrom
leozeli:fix/server-validation-timeout
Open

fix(app): add timeout + cache-control to server validation#1194
leozeli wants to merge 1 commit intoslopus:mainfrom
leozeli:fix/server-validation-timeout

Conversation

@leozeli
Copy link
Copy Markdown

@leozeli leozeli commented Apr 28, 2026

Summary

Fixes #1193

  • Add AbortController with 10-second timeout to prevent fetch() hanging indefinitely when the server is unreachable
  • Add Cache-Control: no-cache + Pragma: no-cache headers to bypass stale Android WebView cache that caused false positive validation results
  • clearTimeout() in finally block to prevent timer leak

Test plan

  • Validate a reachable server → should pass as before
  • Validate an unreachable/offline server → should fail within 10 seconds (previously hung forever)
  • Validate same server twice after taking it offline → second check should fail (previously could pass due to cache)

🤖 Generated with Claude Code

Closes slopus#1193

- Wrap fetch() in AbortController with 10s timeout to prevent
  indefinite hang when server is unreachable
- Add Cache-Control/Pragma: no-cache headers to bypass Android
  WebView cached responses causing false positive validation
- clearTimeout() in finally to avoid timer leak

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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.

fix(app): server validation hangs indefinitely + stale cache causes false positives on Android

1 participant