Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/dispatcher/h2c-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class H2CClient extends DispatcherBase {
#client = null

constructor (origin, clientOpts) {
super()

if (typeof origin === 'string') {
origin = new URL(origin)
}
Expand Down Expand Up @@ -47,6 +45,8 @@ class H2CClient extends DispatcherBase {
)
}

super()

this.#client = new Client(origin, {
...opts,
connect: this.#buildConnector(connect),
Expand Down
4 changes: 2 additions & 2 deletions lib/dispatcher/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ class Pool extends PoolBase {
throw new InvalidArgumentError('connect must be a function or an object')
}

super()

if (typeof connect !== 'function') {
connect = buildConnector({
...tls,
Expand All @@ -65,6 +63,8 @@ class Pool extends PoolBase {
})
}

super()

this[kConnections] = connections || null
this[kUrl] = util.parseOrigin(origin)
this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl }
Expand Down
3 changes: 2 additions & 1 deletion lib/dispatcher/proxy-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ class Http1ProxyWrapper extends DispatcherBase {
#client

constructor (proxyUrl, { headers = {}, connect, factory }) {
super()
if (!proxyUrl) {
throw new InvalidArgumentError('Proxy URL is mandatory')
}

super()

this[kProxyHeaders] = headers
if (factory) {
this.#client = factory(proxyUrl, { connect })
Expand Down
Loading