Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions deps/undici/src/lib/dispatcher/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] () {
Expand Down
8 changes: 4 additions & 4 deletions deps/undici/src/lib/llhttp/wasm_build_env.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

> [email protected].1 prebuild:wasm
> [email protected].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



> [email protected].1 build:wasm
> [email protected].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
Expand Down
2 changes: 1 addition & 1 deletion deps/undici/src/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
1 change: 1 addition & 0 deletions deps/undici/src/types/interceptors.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 8 additions & 0 deletions deps/undici/undici.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down
2 changes: 1 addition & 1 deletion src/undici_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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