undici icon indicating copy to clipboard operation
undici copied to clipboard

Use FinalizationRegistry to dump the socket if the Response is GC'd

Open mcollina opened this issue 11 months ago • 8 comments

If a user can't consume the body anymore, we can just dump it. We can detect a response is not accessible by the use of a FinalizationRegistry.

@KhafraDev I think this would bring us a step closer to the spec.

mcollina avatar Feb 26 '24 18:02 mcollina