diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-16 10:41:17 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-16 10:41:17 +0200 |
| commit | 2167b7cd7ec006ba3f736bc18970f86f15d88a2a (patch) | |
| tree | 5d2426b4fb4b32f6a00e8d3014d3675595e39df6 /packages/meshbay-hub/src/meshbay_hub/static/file-utils.js | |
| parent | 88f4ade0ee1e1a2b6011fd39320ede34d493929f (diff) | |
| download | meshbay-2167b7cd7ec006ba3f736bc18970f86f15d88a2a.tar.gz | |
fix(spa): a reconnect no longer fails the download it reconnects for
While a reconnect ran, every request went out, not only its handshake: a
chunk retried between the new channel opening and the proof got
"Handshake required", which no retry treats as a dropped connection.
Only the opening messages pass now; a replaced channel's late close
event is ignored, and a closed channel is retried like a lost one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/file-utils.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/file-utils.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/file-utils.js b/packages/meshbay-hub/src/meshbay_hub/static/file-utils.js index 585558f..ae6cd6f 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/file-utils.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/file-utils.js @@ -349,9 +349,13 @@ async function _writeOrStall(writable, bytes, at) { } } +// "Transport closed" is not here: that is close(), somebody ending the +// connection on purpose. "DataChannel closed" is the channel going away under +// it, which is what a reconnect is for. function _isRetryableTransportError(err) { return err.name === 'TransportLostError' || err.message === 'Response timeout' + || err.message === 'DataChannel closed' || (err.message || '').startsWith('DataChannel not open'); } |