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

Should allow method to call Teepee.quit() #1145

Open
rustyconover opened this issue Jan 21, 2021 · 3 comments
Open

Should allow method to call Teepee.quit() #1145

rustyconover opened this issue Jan 21, 2021 · 3 comments

Comments

@rustyconover
Copy link
Contributor

Hi Team,

Without destroying the various HTTP and HTTPS agents Assetgraph can keep the event loop open for a long time just waiting for keep-alive connections to be closed. There should be a method on Assetgraph that calls the quit() method on Teepee member instance. This will close the persistent connections held open by the agents.

Thank you,

Rusty

@papandreou
Copy link
Member

Hmm, yeah, that makes sense.

@papandreou
Copy link
Member

Might be even better if we can configure the http(s) agents to only use keep-alive when a new request is made within a tick of the previous one completing. Then we wouldn't need to increase the api surface.

@papandreou
Copy link
Member

Looks like keepAliveMsecs defaults to 1000 milliseconds, so that's what assetgraph must be using: https://nodejs.org/api/http.html#http_new_agent_options

I assume that by "a long time" you mean that you're seeing it holding on to the connections (or at least keeping the event loop alive) for longer than that? Can you share an example?

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

2 participants