mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 05:38:47 +02:00
deps: update undici to 6.21.2
Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/57442 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
parent
757ebb2a2d
commit
f8b969e800
6 changed files with 29 additions and 6 deletions
14
deps/undici/src/lib/dispatcher/pool.js
vendored
14
deps/undici/src/lib/dispatcher/pool.js
vendored
|
@ -73,6 +73,20 @@ class Pool extends PoolBase {
|
|||
? { ...options.interceptors }
|
||||
: undefined
|
||||
this[kFactory] = factory
|
||||
|
||||
this.on('connectionError', (origin, targets, error) => {
|
||||
// If a connection error occurs, we remove the client from the pool,
|
||||
// and emit a connectionError event. They will not be re-used.
|
||||
// Fixes https://github.com/nodejs/undici/issues/3895
|
||||
for (const target of targets) {
|
||||
// Do not use kRemoveClient here, as it will close the client,
|
||||
// but the client cannot be closed in this state.
|
||||
const idx = this[kClients].indexOf(target)
|
||||
if (idx !== -1) {
|
||||
this[kClients].splice(idx, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
[kGetDispatcher] () {
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
|
||||
> undici@6.21.1 prebuild:wasm
|
||||
> undici@6.21.2 prebuild:wasm
|
||||
> node build/wasm.js --prebuild
|
||||
|
||||
> docker build --platform=linux/aarch64 -t llhttp_wasm_builder -f /Users/matteo/repos/node-private/deps/undici/src/build/Dockerfile /Users/matteo/repos/node-private/deps/undici/src
|
||||
> docker build --platform=linux/aarch64 -t llhttp_wasm_builder -f /Users/matteo/repos/node/deps/undici/src/build/Dockerfile /Users/matteo/repos/node/deps/undici/src
|
||||
|
||||
|
||||
|
||||
> undici@6.21.1 build:wasm
|
||||
> undici@6.21.2 build:wasm
|
||||
> node build/wasm.js --docker
|
||||
|
||||
> docker run --rm -t --platform=linux/aarch64 --mount type=bind,source=/Users/matteo/repos/node-private/deps/undici/src/lib/llhttp,target=/home/node/undici/lib/llhttp llhttp_wasm_builder node build/wasm.js
|
||||
> docker run --rm -t --platform=linux/aarch64 --mount type=bind,source=/Users/matteo/repos/node/deps/undici/src/lib/llhttp,target=/home/node/undici/lib/llhttp llhttp_wasm_builder node build/wasm.js
|
||||
|
||||
|
||||
alpine-baselayout-3.4.3-r2
|
||||
|
|
2
deps/undici/src/package.json
vendored
2
deps/undici/src/package.json
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "undici",
|
||||
"version": "6.21.1",
|
||||
"version": "6.21.2",
|
||||
"description": "An HTTP/1.1 client, written from scratch for Node.js",
|
||||
"homepage": "https://undici.nodejs.org",
|
||||
"bugs": {
|
||||
|
|
1
deps/undici/src/types/interceptors.d.ts
vendored
1
deps/undici/src/types/interceptors.d.ts
vendored
|
@ -28,4 +28,5 @@ declare namespace Interceptors {
|
|||
export function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
||||
export function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
||||
export function responseError(opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
||||
export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
|
||||
}
|
||||
|
|
8
deps/undici/undici.js
vendored
8
deps/undici/undici.js
vendored
|
@ -8123,6 +8123,14 @@ var require_pool = __commonJS({
|
|||
this[kOptions] = { ...util.deepClone(options), connect, allowH2 };
|
||||
this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0;
|
||||
this[kFactory] = factory;
|
||||
this.on("connectionError", (origin2, targets, error) => {
|
||||
for (const target of targets) {
|
||||
const idx = this[kClients].indexOf(target);
|
||||
if (idx !== -1) {
|
||||
this[kClients].splice(idx, 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
[kGetDispatcher]() {
|
||||
for (const client of this[kClients]) {
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
// Refer to tools/dep_updaters/update-undici.sh
|
||||
#ifndef SRC_UNDICI_VERSION_H_
|
||||
#define SRC_UNDICI_VERSION_H_
|
||||
#define UNDICI_VERSION "6.21.1"
|
||||
#define UNDICI_VERSION "6.21.2"
|
||||
#endif // SRC_UNDICI_VERSION_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue