Repository navigation
fix: fall back when heartbeat worker fails - #752
Open
JangHyeok2909 wants to merge 1 commit into
Open
JangHyeok2909 wants to merge 1 commit into
JangHyeok2909 wants to merge 1 commit into
Conversation
Member
|
Many thanks for the PR. I have done a brief review of the code. I need to review the test cases. I need to ensure that the test cases use a similar pattern to the existing test cases. I will merge it after reviewing. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #751.
Why
A strict Content Security Policy can allow same-origin workers while rejecting
blob:workers. In current Chrome,new Worker(blobUrl)still returns a Worker and the CSP rejection arrives later through the Worker'serrorevent. Without an error handler, outgoing heartbeat ticks stop even though the STOMP connection can finish connecting.Synchronous initialization failures also currently escape from heartbeat setup, and each reconnect leaves another object URL allocated.
The fallback matches the existing behavior used when Web Workers are unavailable.
Verification
Ticker, the suite reproduced three failures—missing URL revocation, an escaping constructor error, and no fallback after an asynchronous Worker error.worker-src blob:used the Worker normally;worker-src 'self'produced the CSP error and continued ticking through the interval fallback.no-explicit-anywarnings remain unchanged.