mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 22:18:33 +00:00
Revert "perf: optimize DNS resolution to reduce request latency (#7550)"
This reverts commit 55b952f958601b3177607a067d74352e6a4a6cd4.
This commit is contained in:
@@ -3,7 +3,6 @@ import tls from 'node:tls';
|
||||
import type { Agent as HttpAgent } from 'node:http';
|
||||
import type { Agent as HttpsAgent } from 'node:https';
|
||||
import { createTimelineAgentClass, createTimelineHttpAgentClass, type TimelineEntry, type AgentOptions, type HttpAgentOptions, type AgentClass, type HttpAgentClass } from './timeline-agent';
|
||||
import { defaultAgentOptions } from '../network/agent-defaults';
|
||||
|
||||
/**
|
||||
* Agent cache for SSL session reuse.
|
||||
@@ -268,16 +267,8 @@ function getOrCreateAgentInternal<TOptions extends HttpAgentOptions>(
|
||||
}
|
||||
|
||||
const AgentClass = timeline ? getTimelineClass(BaseAgentClass) : BaseAgentClass;
|
||||
|
||||
// Inject shared agent defaults (DNS lookup, socket pool settings), then
|
||||
// layer on the caller's options so per-agent overrides still take effect.
|
||||
const optimizedOptions = {
|
||||
...defaultAgentOptions,
|
||||
...options
|
||||
};
|
||||
|
||||
// Convert raw `ca` to a secureContext that adds CAs on top of OpenSSL defaults
|
||||
const resolvedOptions = applySecureContext(optimizedOptions);
|
||||
const resolvedOptions = applySecureContext(options);
|
||||
|
||||
let agent: HttpAgent | HttpsAgent;
|
||||
if (timeline) {
|
||||
|
||||
Reference in New Issue
Block a user