backend v4 half

This commit is contained in:
2025-07-18 09:20:40 +02:00
parent aba7a506ad
commit 725516ad6c
4183 changed files with 217684 additions and 75056 deletions
@@ -83,7 +83,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
this.config?.httpAgent?.destroy();
this.config?.httpsAgent?.destroy();
}
async handle(request, { abortSignal } = {}) {
async handle(request, { abortSignal, requestTimeout } = {}) {
if (!this.config) {
this.config = await this.configProvider;
}
@@ -179,8 +179,9 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
abortSignal.onabort = onAbort;
}
}
const effectiveRequestTimeout = requestTimeout ?? this.config.requestTimeout;
timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout));
timeouts.push(setSocketTimeout(req, reject, this.config.requestTimeout));
timeouts.push(setSocketTimeout(req, reject, effectiveRequestTimeout));
const httpAgent = nodeHttpsOptions.agent;
if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
timeouts.push(setSocketKeepAlive(req, {
@@ -188,7 +189,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
keepAliveMsecs: httpAgent.keepAliveMsecs,
}));
}
writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch((e) => {
writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout).catch((e) => {
timeouts.forEach(timing.clearTimeout);
return _reject(e);
});