Closed KPull closed 8 months ago
This could potentially fix https://github.com/long2ice/asynch/issues/93 too.
@long2ice mind taking a look at this?
Thanks!
Thanks for merging this! If you get a chance, would you mind creating a new release so we can benefit from this fix?
Nicely done! When can we have a new release available with this fix?
Also expecting a new release for this fix
When a query eventually made its way into the
ExecuteContext
, if establishing the connection raised an error within the__aenter__
section, the connection was not being cleared up. Subsequent queries to the same connection (in a pool) would state that the "previous query should be finished first."In this pull request, we attempt to disconnect the connection (essentially doing the same thing
__aexit__
does), marking it as stale within its associated pool, if the connection fails to be establish.Thanks to @borgmatthew as well who helped with identifying the issue.