GeezerVison is showing github.com — deps: update undici to 6.21.2 · nodejs/node@162b282
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: deps/undici/src/lib/dispatcher/pool.js +14Lines changed: 14 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -73,6 +73,20 @@ class Pool extends PoolBase { | 73 | 73 | ? { ...options.interceptors } | 74 | 74 | : undefined | 75 | 75 | 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 | + }) | 76 | 90 | } | 77 | 91 |
| 78 | 92 | [kGetDispatcher] () { | |
Collapse file 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 number | Diff line number | Diff line change |
|---|
| 1 | 1 |
| 2 | | - | | 2 | + | 3 | 3 | > node build/wasm.js --prebuild | 4 | 4 |
| 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 | 6 | 6 |
| 7 | 7 |
| 8 | 8 |
| 9 | | - | | 9 | + | 10 | 10 | > node build/wasm.js --docker | 11 | 11 |
| 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 | 13 | 13 |
| 14 | 14 |
| 15 | 15 | alpine-baselayout-3.4.3-r2 | |
Collapse file Copy file name to clipboardExpand all lines: deps/undici/src/package.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "name": "undici", | 3 | | - "version": "6.21.1", | | 3 | + "version": "6.21.2", | 4 | 4 | "description": "An HTTP/1.1 client, written from scratch for Node.js", | 5 | 5 | "homepage": "https://undici.nodejs.org", | 6 | 6 | "bugs": { | |
Collapse file Copy file name to clipboardExpand all lines: deps/undici/src/types/interceptors.d.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -28,4 +28,5 @@ declare namespace Interceptors { | 28 | 28 | export function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | 29 | 29 | export function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | 30 | 30 | export function responseError(opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | | 31 | + export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | 31 | 32 | } |
Collapse file Copy file name to clipboardExpand all lines: deps/undici/undici.js +8Lines changed: 8 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -8123,6 +8123,14 @@ var require_pool = __commonJS({ | 8123 | 8123 | this[kOptions] = { ...util.deepClone(options), connect, allowH2 }; | 8124 | 8124 | this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; | 8125 | 8125 | 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 | + }); | 8126 | 8134 | } | 8127 | 8135 | [kGetDispatcher]() { | 8128 | 8136 | for (const client of this[kClients]) { | |
Collapse file Copy file name to clipboardExpand all lines: src/undici_version.h +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 | // Refer to tools/dep_updaters/update-undici.sh | 3 | 3 | #ifndef SRC_UNDICI_VERSION_H_ | 4 | 4 | #define SRC_UNDICI_VERSION_H_ | 5 | | -#define UNDICI_VERSION "6.21.1" | | 5 | +#define UNDICI_VERSION "6.21.2" | 6 | 6 | #endif // SRC_UNDICI_VERSION_H_ |
|