Skip to content

Robustness: Add timeout/abort for beforeunload script-kill fetch to avoid hanging unloads #195

@YUVRAJ-SINGH-3178

Description

@YUVRAJ-SINGH-3178

The page beforeunload/cleanup fetch that posts run_id to kill running scripts uses fetch(..., keepalive: true) but no timeout or Abort handling. If the backend is unresponsive the promise can hang and the cleanup may fail or block graceful exit. Location: ui/app.js. Steps to reproduce: put backend into unresponsive state and close page; browser may hang or not reliably kill remote run. Expected: cleanup request should be best-effort and not block unload. Suggested fix: use navigator.sendBeacon() for fire-and-forget where appropriate, or wrap fetch with AbortController and a short timeout (1000–2000ms) so the page unload isn't blocked.

@siddu-k Assign me this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions