Kaydet (Commit) 9bbb43dd authored tarafından Aymeric Augustin's avatar Aymeric Augustin

[1.7.x] Ignored repeated calls to connection.close().

Backport of d4cc59ef from master
üst 5cd64296
......@@ -188,6 +188,8 @@ class BaseDatabaseWrapper(object):
# Don't call validate_no_atomic_block() to avoid making it difficult
# to get rid of a connection in an invalid state. The next connect()
# will reset the transaction state anyway.
if self.closed_in_transaction or self.connection is None:
return
try:
self._close()
finally:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment