Skip to content

fix: http_server_native to close ReadableStream on abort signal#1

Closed
Thesephi wants to merge 3 commits intomainfrom
patch-1
Closed

fix: http_server_native to close ReadableStream on abort signal#1
Thesephi wants to merge 3 commits intomainfrom
patch-1

Conversation

@Thesephi
Copy link
Owner

@Thesephi Thesephi commented Dec 3, 2024

See PR towards the upstream repo: oakserver#685

How to test

Step 1

clone this branch, check that all tests pass

deno test -A

Step 2

comment out this line:

signal?.addEventListener("abort", () => controller.close(), { once: true });

then rerun the test, 1 should fail:

Application.listen() - no options - aborted after onListen ...
ok | 0 passed | 0 failed (2s)

error: Promise resolution is still pending but the event loop has already resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant