8000 fix: release pg-pool connection regardless of whether commit throws by mlipscombe · Pull Request #978 · graphile/crystal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: release pg-pool connection regardless of whether commit throws #978

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

Merged
merged 3 commits into from
Jan 27, 2019

Conversation

mlipscombe
Copy link
Contributor

Currently, if the commit fails, the pg-pool client will not be released, eventually leading to pool exhaustion. This PR ensures that no matter what happens, the client is released.

Copy link
Member
@benjie benjie left a comment

Choose a reason for hiding this comment

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

Great catch! Release should always be in a finally block on its own to ensure it runs no matter what.

@benjie benjie merged commit ef4e017 into graphile:master Jan 27, 2019
@benjie
Copy link
Member
benjie commented Jan 30, 2019

Shipped in v4.3.2: https://github.com/graphile/postgraphile/releases/tag/v4.3.2 🎉

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

Successfully merging this pull request may close these issues.

2 participants
0