Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Destroy() socket on timeout #22

Merged
merged 1 commit into from
Feb 14, 2024
Merged

Conversation

schleyfox
Copy link

Unifies error handling/resetting state in error().

I believe the use of end() was causing lingering connections on memcached on timeout, which often seemed to at least correspond with things cruftier. I'm basing the reasoning for this change on the comment in node-postgres of

https://github.com/brianc/node-postgres/blob/2a8efbee09a284be12748ed3962bc9b816965e36/packages/pg/lib/client.js#L611-L612

and since they use destroy() on timeout as well:

https://github.com/brianc/node-postgres/blob/2a8efbee09a284be12748ed3962bc9b816965e36/packages/pg/lib/client.js#L106

Unifies error handling/resetting state in error()
Copy link

@nathannotion nathannotion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems reasonable and removing end sounds good based on comments below

@schleyfox schleyfox merged commit d7ce226 into master Feb 14, 2024
1 check passed
@schleyfox schleyfox deleted the benjamin--destroy-socket-on-timeout branch February 14, 2024 19:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants