Skip to content

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.

2 participants