diff options
Diffstat (limited to 'cpp/src/Freeze/ConnectionI.cpp')
-rw-r--r-- | cpp/src/Freeze/ConnectionI.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/cpp/src/Freeze/ConnectionI.cpp b/cpp/src/Freeze/ConnectionI.cpp index 258060f9f5c..7bd9a114f13 100644 --- a/cpp/src/Freeze/ConnectionI.cpp +++ b/cpp/src/Freeze/ConnectionI.cpp @@ -44,17 +44,8 @@ Freeze::ConnectionI::close() { if(_transaction) { - try - { - _transaction->rollbackInternal(true); - } - catch(const DatabaseException&) - { - // - // Ignored - // - } - assert(!_transaction); + _transaction->rollbackInternal(true); + assert(_transaction == 0); } while(!_mapList.empty()) @@ -97,7 +88,13 @@ Freeze::ConnectionI::__decRef() else if(_refCount == 1 && _transaction != 0 && _transaction->dbTxn() != 0 && _transaction->__getRefNoSync() == 1) { sync.release(); - close(); + if(_transaction) + { + // + // This makes the transaction release the last refcount on the connection + // + _transaction->rollbackInternal(true); + } } } |