undici
undici copied to clipboard
fix: don't call onConnect multiple times for sub handler
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