From 5f0a7bb152b30dd7b05771725a7ffe16e3af8f8a Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 22 Jun 2012 12:24:08 -0400 Subject: - [bug] Fixed bug whereby a disconnect detect + dispose that occurs when the QueuePool has threads waiting for connections would leave those threads waiting for the duration of the timeout on the old pool. The fix now notifies those waiters with a special exception case and has them move onto the new pool. This fix may or may not be ported to 0.7. [ticket:2522] --- lib/sqlalchemy/engine/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/sqlalchemy/engine/base.py') diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index d13344ff6..75f6ac29a 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -2253,8 +2253,7 @@ class Engine(Connectable, log.Identified): the engine are not affected. """ - self.pool.dispose() - self.pool = self.pool.recreate() + self.pool = self.pool._replace() @util.deprecated("0.7", "Use the create() method on the given schema " "object directly, i.e. :meth:`.Table.create`, " -- cgit v1.2.1