backend v4 half
This commit is contained in:
Generated
Vendored
+4
-3
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user