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

Possible function divergence in "request.setTimeout(0)"? #2351

Open
2 of 3 tasks
J9B10 opened this issue May 16, 2024 · 0 comments
Open
2 of 3 tasks

Possible function divergence in "request.setTimeout(0)"? #2351

J9B10 opened this issue May 16, 2024 · 0 comments

Comments

@J9B10
Copy link

J9B10 commented May 16, 2024

What would you like to discuss?

I got here through a link in a Got file "timed-out.js".

I'm a beginner and just like a curious cat I found things in the archives.

About notice:
// request.setTimeout(0) causes a memory leak.

Line 61: \got\dist\source\core\timed-out.js

I saw this warning about memory leak.

I looked more about the use of this function and found a file that uses this problematic function when using http2.

Line 659: \got\dist\source\core\index.js

This file "index.js" is using the function as specified as problematic "request.setTimeout(0)" on line 659.

So I don't understand if the code is correct or someone forgot to correct this function.

My application has a random memory leak that happens after a few hours of use by calling an external api using Got with http2 enabled.

Could this have to do with the memory leak I get?

Got 14.2.1
Node 22.2.0.0

I'm just a beginner in programming.
I don't know if I'm posting this in the right or wrong place.
Sorry for my English as I'm using automatic translators.

Checklist

  • I have read the documentation.
  • I have use latest version of Got.
  • I have use latest version of Node.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant