-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Is there a way to drop or close an actual connection when I'm using PooldConnection? #121
Comments
I had similar issue, I hacked it like this: implement
so when I have aquired connection and some error occures, I can decide, if to return connection to pool or to destroy it by calling |
@sfackler |
This seems like quite the hack. Is there really no way of closing or returning a connection to the pool explicitly? I'd expect something like |
FWIW I found one source that says connections are returned to the pool as soon as they go out of scope |
Because when I work with the connection of PooldConnection got by Pool.get and face some error that a protocol of the connection became bad state, I'd liket to close the actual connection.
I don't want to use test_on_checkout because it's high impact for performance.
The text was updated successfully, but these errors were encountered: