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

Add new optional parameter to have all sockets send KeepAlive packets #2110

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

carboneater
Copy link

So I work with the author of #1939

Today I decided that replacing our custom pool management with this project's implementation would solve a few bugs we had.
And it did, great job, folks!

However, the trigger happy load balancers are here to stay.

Extending the fix given in the above issue was easy enough with Pools. (Hooking to the Pool's connect event worked like a charm). PoolClusters were another thing altogether...

And (as we're working in TypeScript), the code was actually messier with the need to expose internal variables and attach event listeners to every internal pool.

Hence this PR to add another configuration option to specify a keepAliveDelay, that, if set, is applied when a socket is created. Otherwise, it will use the system's settings. (Node's default is to not use a KeepAlive.)

Side note : I'd be more than happy to update @types/mysql to reflect these changes once they are merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants