Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions deltachat-jsonrpc/src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1361,17 +1361,14 @@ impl CommandApi {
/// Returns once a remote device has retrieved the backup.
async fn provide_backup(&self, account_id: u32) -> Result<()> {
let ctx = self.get_context(account_id).await?;
ctx.stop_io().await;
let provider = match imex::BackupProvider::prepare(&ctx).await {
Ok(provider) => provider,
Err(err) => {
ctx.start_io().await;
return Err(err);
}
};
let res = provider.await;
ctx.start_io().await;
res
provider.await
}

/// Returns the text of the QR code for the running [`CommandApi::provide_backup`].
Expand Down