emscripten-core / emscripten-core/emscripten
Failing to fetch() Wasm retries the network request
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
If the fetch() fails (no network, 404, whatever) here
https://github.com/emscripten-core/emscripten/blob/7ed425edb82161c3d60ef5d00f939446edddce42/src/preamble.js#L607-L608
it will be retried, regardless of why it failed here
https://github.com/emscripten-core/emscripten/blob/7ed425edb82161c3d60ef5d00f939446edddce42/src/preamble.js#L619
https://github.com/emscripten-core/emscripten/blob/7ed425edb82161c3d60ef5d00f939446edddce42/src/web_or_worker_shell_read.js#L44
The retry logic shouldn't retry the network call, because the end result is that if you pass a bad URL or serve a broken Wasm file it gets requested twice, just to make sure.
(See also https://github.com/tree-sitter/tree-sitter/pull/4775 )
Contributor guide
Assessment
This issue has not been assessed yet.