-
-
Notifications
You must be signed in to change notification settings - Fork 660
Add "clientLifetime" option to close and remove connections from the pool after a specified time. #4175
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
Conversation
I'm under the impression that this can be already achieved through On top, consider the possibility of verify/preempt the client upon a request, so we reduce the surface for possible race conditions between removal and new upcoming request. |
I would have gone down that route but i'm not sure how to remove a client from the pool. That doesn't seem to be exposed anywhere in |
I updated the logic to remove clients in the |
…after a specified time.
Ugh, I was trying to rebase my fork to hopefully fix the test issues and screwed up. Please re-approve when you get the chance. I squashed it down to one commit so it will be cleaner. |
Hi @metcoder95 Any idea why those tests might be failing? They don't seem related to may changes as far as I can tell. |
Yeah, these are flaky tests that needs to be fixed; but are not related to your changes. |
Is there a way to re-run them until they pass? |
They will fail constantly. I hope I can have a fix soon |
Hi @metcoder95 , I'm a bit bummed this didn't make it into the 7.9.0 release. What are the steps forward? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…after a specified time. (nodejs#4175) Co-authored-by: Carlos Fuentes <me@metcoder.dev>
This relates to...
This feature allows clients to be closed and removed from the pool after a specified amount of time.
Rationale
This feature can be helpful to avoid GOAWAY connection errors when dealing with HTTP2 connections where the amount of time they are valid for is known beforehand.
Changes
This adds a "clientLifetime" option to the Pool options allowing specification of a fixed lifetime for clients in mils
Bug Fixes
N/A
Status