Skip to content

Commit 6325d80

Browse files
committed
ref(jsonrpc): Do not explicitly stop IO for provider
Since #4182 (35f50a8) we no longer need to stop IO explicitly, so let's not do that as it makes things simpler to understand.
1 parent 034cde9 commit 6325d80

File tree

1 file changed

+1
-4
lines changed
  • deltachat-jsonrpc/src/api

1 file changed

+1
-4
lines changed

deltachat-jsonrpc/src/api/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,17 +1361,14 @@ impl CommandApi {
13611361
/// Returns once a remote device has retrieved the backup.
13621362
async fn provide_backup(&self, account_id: u32) -> Result<()> {
13631363
let ctx = self.get_context(account_id).await?;
1364-
ctx.stop_io().await;
13651364
let provider = match imex::BackupProvider::prepare(&ctx).await {
13661365
Ok(provider) => provider,
13671366
Err(err) => {
13681367
ctx.start_io().await;
13691368
return Err(err);
13701369
}
13711370
};
1372-
let res = provider.await;
1373-
ctx.start_io().await;
1374-
res
1371+
provider.await
13751372
}
13761373

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

0 commit comments

Comments
 (0)