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

node: http(s).globalAgent is missing #18312

Closed
cody880910 opened this issue Nov 25, 2022 · 1 comment · Fixed by #21081
Closed

node: http(s).globalAgent is missing #18312

cody880910 opened this issue Nov 25, 2022 · 1 comment · Fixed by #21081
Labels
bug Something isn't working correctly node compat

Comments

@cody880910
Copy link

When I quote npm inclusion as below:
var useSSL = endpoint.protocol === 'https:';
var http = require('https');
if (httpOptions.maxSockets) {
http.globalAgent.maxSockets = httpOptions.maxSockets;
} else {
http.globalAgent.maxSockets = 300;
}

Show: Cannot set properties of undefined (setting 'maxSockets')

I have seen: https://deno.land/[email protected]/node/https.ts?source
Legal definition: export const globalAgent = undefined;

Not this: export const globalAgent = new Agent();

@bartlomieju bartlomieju transferred this issue from denoland/deno Nov 25, 2022
@kt3k kt3k changed the title node/https :export const globalAgent = undefined; node: http(s).globalAgent is missing Mar 21, 2023
@kt3k kt3k transferred this issue from denoland/std Mar 21, 2023
@kt3k kt3k added bug Something isn't working correctly node compat labels Mar 21, 2023
@jcbhmr
Copy link
Contributor

jcbhmr commented Sep 20, 2023

This notably prevents https://www.npmjs.com/package/@actions/http-client from working due to it using http.globalAgent

littledivy pushed a commit that referenced this issue Nov 11, 2023
Fixes #21080 
Fixes #18312

---------

Signed-off-by: Jacob Hummer <[email protected]>
kt3k pushed a commit that referenced this issue Nov 17, 2023
Fixes #21080 
Fixes #18312

---------

Signed-off-by: Jacob Hummer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants