Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for case where db_pool connections can be lost.
The problem occurs if: (1) A greenthread was waiting for a connection from the pool (2) Another thread calls put() to return a connection to the pool, but it has expired, so the first thread will be cleared to create a new connection (3) The create() method raises an exception that doesn't inherit from Exception, such as eventlet.Timeout Note that eventlet.pools.Pool.get uses "except:" instead of "except: Exception" to make sure all exceptions from create() are accounted for, but eventlet.db_pool.get() incorrectly uses "except: Exception" in the case where a returned connection was found to be unusable.
- Loading branch information