Commit 32336b6f authored by Eric Cano's avatar Eric Cano
Browse files

Protected destructor from exceptions.

Garbage collection will still be able to pick up the pieces in case of exception.
parent cc3f1b34
......@@ -715,11 +715,13 @@ void OStoreDB::ArchiveToFileRequestCancelation::complete() {
OStoreDB::ArchiveToFileRequestCancelation::~ArchiveToFileRequestCancelation() {
if (!m_closed) {
m_request.garbageCollect(m_agent->getAddressIfSet());
objectstore::ScopedExclusiveLock al (*m_agent);
m_agent->fetch();
m_agent->removeFromOwnership(m_request.getAddressIfSet());
m_agent->commit();
try {
m_request.garbageCollect(m_agent->getAddressIfSet());
objectstore::ScopedExclusiveLock al (*m_agent);
m_agent->fetch();
m_agent->removeFromOwnership(m_request.getAddressIfSet());
m_agent->commit();
} catch (...) {}
}
}
......
Supports Markdown
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