Closed roberth closed 4 years ago
@nikita-volkov This has worked well for me in production. Do you think it can be merged?
Thanks! Sorry for missing the PR before
No problem. Thanks for merging!
@nikita-volkov any idea why the tests are failing?
Yup. It's the changes in the requirements of Travis. I've updated the config to fix that.
Before this change, IO-based exceptions in the session (
act
) caused the connection to "used" indefinitely; not returning capacity to the pool, eventually depleting the pool.This PR is a conservative fix for the problem. I recommend to use
withResource
from theresource-pool
package itself. It is more widely used and it does not have this problem. Additionally it unmasks exceptions for sessions. Do you think masking async exceptions is appropriate for sessions?