summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/pool.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/pool.py')
-rw-r--r--lib/sqlalchemy/pool.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/pool.py b/lib/sqlalchemy/pool.py
index ff38f21b8..7a5c2ef0e 100644
--- a/lib/sqlalchemy/pool.py
+++ b/lib/sqlalchemy/pool.py
@@ -208,7 +208,12 @@ class _ConnectionRecord(object):
if self.connection is not None:
if self.__pool._should_log_info:
self.__pool.log("Closing connection %s" % repr(self.connection))
- self.connection.close()
+ try:
+ self.connection.close()
+ except:
+ if self.__pool._should_log_info:
+ self.__pool.log("Exception closing connection %s" % repr(self.connection))
+
def invalidate(self, e=None):
if self.__pool._should_log_info: