test: live query teardown - #16849
test: live query teardown#16849elliott-with-the-longest-name-on-github wants to merge 11 commits into
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/20bf6d1d7e82d3f9b071507fa986b264df2f10fdOpen in |
🦋 Changeset detectedLatest commit: 20bf6d1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| void generator.return(undefined).catch(() => {}); | ||
| } | ||
|
|
||
| return new Response( |
There was a problem hiding this comment.
Restores the request-abort teardown from #16790. Without it, a platform that aborts the request without cancelling the response stream leaves the keep-alive timer enqueueing into an unread buffer forever, and a generator that throws AbortError on disconnect routes a 500 through handleError because open is still true.
| return new Response( | |
| event.request.signal.addEventListener('abort', () => teardown(true), { once: true }); | |
| return new Response( |
Can push a test for the abort path if you take this.
There was a problem hiding this comment.
Huh. I don't know if I'm specifically against this. But should we treat the platform aborting the request without closing the response stream as a bug? That seems like something the platform should definitely be doing.
Co-authored-by: Nic Polumeyv <nicolas.polum@outlook.com>
closes #
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits