Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 162b282

Browse filesBrowse files
mcollinaaduh95
authored andcommitted
deps: update undici to 6.21.2
Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: #57442 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent ee1c78a commit 162b282
Copy full SHA for 162b282

File tree

Expand file treeCollapse file tree

6 files changed

+29
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

6 files changed

+29
-6
lines changed
Open diff view settings
Collapse file

‎deps/undici/src/lib/dispatcher/pool.js‎

Copy file name to clipboardExpand all lines: deps/undici/src/lib/dispatcher/pool.js
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@ class Pool extends PoolBase {
7373
? { ...options.interceptors }
7474
: undefined
7575
this[kFactory] = factory
76+
77+
this.on('connectionError', (origin, targets, error) => {
78+
// If a connection error occurs, we remove the client from the pool,
79+
// and emit a connectionError event. They will not be re-used.
80+
// Fixes https://github.com/nodejs/undici/issues/3895
81+
for (const target of targets) {
82+
// Do not use kRemoveClient here, as it will close the client,
83+
// but the client cannot be closed in this state.
84+
const idx = this[kClients].indexOf(target)
85+
if (idx !== -1) {
86+
this[kClients].splice(idx, 1)
87+
}
88+
}
89+
})
7690
}
7791

7892
[kGetDispatcher] () {
Collapse file

‎deps/undici/src/lib/llhttp/wasm_build_env.txt‎

Copy file name to clipboardExpand all lines: deps/undici/src/lib/llhttp/wasm_build_env.txt
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11

2-
> undici@6.21.1 prebuild:wasm
2+
> undici@6.21.2 prebuild:wasm
33
> node build/wasm.js --prebuild
44

5-
> 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
5+
> 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
66

77

88

9-
> undici@6.21.1 build:wasm
9+
> undici@6.21.2 build:wasm
1010
> node build/wasm.js --docker
1111

12-
> 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
12+
> 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
1313

1414

1515
alpine-baselayout-3.4.3-r2
Collapse file

‎deps/undici/src/package.json‎

Copy file name to clipboardExpand all lines: deps/undici/src/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "undici",
3-
"version": "6.21.1",
3+
"version": "6.21.2",
44
"description": "An HTTP/1.1 client, written from scratch for Node.js",
55
"homepage": "https://undici.nodejs.org",
66
"bugs": {
Collapse file

‎deps/undici/src/types/interceptors.d.ts‎

Copy file name to clipboardExpand all lines: deps/undici/src/types/interceptors.d.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ declare namespace Interceptors {
2828
export function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
2929
export function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
3030
export function responseError(opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
31+
export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
3132
}
Collapse file

‎deps/undici/undici.js‎

Copy file name to clipboardExpand all lines: deps/undici/undici.js
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8123,6 +8123,14 @@ var require_pool = __commonJS({
81238123
this[kOptions] = { ...util.deepClone(options), connect, allowH2 };
81248124
this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0;
81258125
this[kFactory] = factory;
8126+
this.on("connectionError", (origin2, targets, error) => {
8127+
for (const target of targets) {
8128+
const idx = this[kClients].indexOf(target);
8129+
if (idx !== -1) {
8130+
this[kClients].splice(idx, 1);
8131+
}
8132+
}
8133+
});
81268134
}
81278135
[kGetDispatcher]() {
81288136
for (const client of this[kClients]) {
Collapse file

‎src/undici_version.h‎

Copy file name to clipboardExpand all lines: src/undici_version.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
// Refer to tools/dep_updaters/update-undici.sh
33
#ifndef SRC_UNDICI_VERSION_H_
44
#define SRC_UNDICI_VERSION_H_
5-
#define UNDICI_VERSION "6.21.1"
5+
#define UNDICI_VERSION "6.21.2"
66
#endif // SRC_UNDICI_VERSION_H_

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.