undici icon indicating copy to clipboard operation
undici copied to clipboard

fix: don't call onConnect multiple times for sub handler

Open ronag opened this issue 9 months ago • 1 comments

Many sub-handlers (e.g. api-request) don't expect onConnect (or any other handler other than onData or onBodySent) to be called multiple times.

I'm not sure why/how we haven't caught this earlier. Should fail at https://github.com/nodejs/undici/blob/4013c4b8932e73728809e4106d5c9d9d40648031/lib/api/api-request.js#L73

ronag avatar Sep 24 '23 15:09 ronag