Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allowH2 is not defined in buildConnector.BuildOptions #2333

Closed
binsee opened this issue Oct 11, 2023 · 1 comment
Closed

allowH2 is not defined in buildConnector.BuildOptions #2333

binsee opened this issue Oct 11, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@binsee
Copy link
Contributor

binsee commented Oct 11, 2023

Bug Description

After undici added support for http2, allowH2 was added to the buildConnector parameters, but was not added to the type definition.

function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) {

undici/lib/client.js

Lines 256 to 265 in 882ff6d

connect = buildConnector({
...tls,
maxCachedSessions,
allowH2,
socketPath,
timeout: connectTimeout,
...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),
...connect
})
}

undici/lib/pool.js

Lines 55 to 64 in 882ff6d

connect = buildConnector({
...tls,
maxCachedSessions,
allowH2,
socketPath,
timeout: connectTimeout == null ? 10e3 : connectTimeout,
...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),
...connect
})
}

declare namespace buildConnector {
export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & {
maxCachedSessions?: number | null;
socketPath?: string | null;
timeout?: number | null;
port?: number;
keepAlive?: boolean | null;
keepAliveInitialDelay?: number | null;
}

Reproducible By

Expected Behavior

Logs & Screenshots

Environment

  • undici 5.25.4

Additional context

@binsee binsee added the bug Something isn't working label Oct 11, 2023
@mcollina
Copy link
Member

Fixed in #2334

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants