mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
fix(imex): transfer::get_backup must always free ongoing process (#4249)
* fix(imex): transfer::get_backup must always free ongoing process When the ongoing process is cancelled it is still the responsibility of whoever took out the ongoing process to free it. This code was only freeing the ongoing process when completed normally but not when cancelled. * add changelog
This commit is contained in:
committed by
GitHub
parent
d6fdc7cb67
commit
ef63e01632
@@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## [1.112.3] - Unreleased
|
||||
|
||||
### Changes
|
||||
|
||||
### Fixes
|
||||
- transfer::get_backup now frees ongoing process when cancelled. #4249
|
||||
|
||||
## [1.112.2] - 2023-03-30
|
||||
|
||||
### Changes
|
||||
@@ -10,7 +17,6 @@
|
||||
### Fixes
|
||||
- Do not return media from trashed messages in the "All media" view. #4247
|
||||
|
||||
|
||||
## [1.112.1] - 2023-03-27
|
||||
|
||||
### Changes
|
||||
|
||||
@@ -392,12 +392,10 @@ pub async fn get_backup(context: &Context, qr: Qr) -> Result<()> {
|
||||
let cancel_token = context.alloc_ongoing().await?;
|
||||
let res = tokio::select! {
|
||||
biased;
|
||||
res = get_backup_inner(context, qr) => {
|
||||
context.free_ongoing().await;
|
||||
res
|
||||
}
|
||||
res = get_backup_inner(context, qr) => res,
|
||||
_ = cancel_token.recv() => Err(format_err!("cancelled")),
|
||||
};
|
||||
context.free_ongoing().await;
|
||||
res
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user