Report imex and configure success/failure after freeing ongoing

Otherwise it's possible that library user (e.g. test)
tries to start another ongoing process when previous one is
not freed yet.
This commit is contained in:
link2xt
2022-06-20 16:45:09 +00:00
parent 7ce291fac5
commit 377fa01e98
3 changed files with 18 additions and 23 deletions

View File

@@ -75,6 +75,8 @@ impl Context {
}))
.await;
self.free_ongoing().await;
if let Err(err) = res.as_ref() {
progress!(
self,
@@ -93,8 +95,6 @@ impl Context {
progress!(self, 1000);
}
self.free_ongoing().await;
res
}