Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trigger error for stream on client when it is not finished as expected (
#65798) ### What * Error on case that readable stream controller tries to close but stream is either errored or unfinished * Delay the DOMContentLoaded event to avoid "Connection Closed" error ### Why Regarding to the new error about readbale stream controller, the new error we added here is for identifying the connection is closing before the last bit has been received that's an error case not intentional close. It's not a proper state for close more for erroring. As for adding the queuing for the task of dom content loaded callback, after investigation, I found that if the DOMLoaded execute earlier the readable stream controller cuold close earlier on client, which lead to the "Connection Closed." error. Hence we added a `queueMicroTask` here to delay it after hydrate call. x-ref: [slack thread](https://vercel.slack.com/archives/C01A2M9R8RZ/p1715188343813489)
- Loading branch information