Skip to content

Add optional downloadTimeout to bound package/file downloads - #616

Open
Forevener wants to merge 1 commit into
r-wasm:mainfrom
Forevener:main
Open

Add optional downloadTimeout to bound package/file downloads#616
Forevener wants to merge 1 commit into
r-wasm:mainfrom
Forevener:main

Conversation

@Forevener

@Forevener Forevener commented Jun 23, 2026

Copy link
Copy Markdown

downloadFileContent issues a synchronous XMLHttpRequest with no timeout, so a repository that's unreachable in a way that leaves the connection pending (accepted-but-no-response, or a black-holed route) parks the worker thread inside send() indefinitely — R can't service interrupts while blocked there, so webr::install() never returns and the session wedges. R's options(timeout=) doesn't reach this path. This adds an optional downloadTimeout (ms) so consumers can bound these requests; on expiry the existing catch turns it into a clean download failure and the installer can fall through to the next repo. Default 0 preserves current behavior (no timeout) — fully non-breaking. timeout on a sync XHR is permitted in a Worker/Node context (only disallowed when the global is a Window). Could be related to #235.

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