From 2351cc071fb7d743474811a17ea90d9c28bd9022 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 8 Dec 2020 20:55:09 -0800 Subject: [PATCH] ircd::m::acquire: Move tail cleanup to dtor. --- matrix/acquire.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/matrix/acquire.cc b/matrix/acquire.cc index 59af4fd33..7ba07f79e 100644 --- a/matrix/acquire.cc +++ b/matrix/acquire.cc @@ -72,16 +72,23 @@ ircd::m::acquire::acquire::acquire(const struct opts &opts) // Branch to acquire state if(opts.state) acquire_state(); +} +ircd::m::acquire::~acquire() +noexcept try +{ // Complete all work before returning, otherwise everything // will be cancelled on unwind. while(!fetching.empty()) while(handle()); } - -ircd::m::acquire::~acquire() -noexcept +catch(const ctx::interrupted &) { + return; +} +catch(const ctx::terminated &) +{ + return; } void