undici icon indicating copy to clipboard operation
undici copied to clipboard

Client will connect even if all requests are aborted

Open ronag opened this issue 3 years ago • 1 comments

Client will not notice requests might be aborted until request.onConnect which will only happen after the socket has connected. Thus the client might unnecessarily create a connection if all pending requests have been aborted.

A bit of an edge case.

ronag avatar Aug 30 '20 17:08 ronag

We would need an even earlier hook for abort, i.e. we would need something like a onStart(abort) hook (or some other name) which is called when enqueued on the client or before socket init.

ronag avatar Aug 30 '20 17:08 ronag