mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 14:56:33 +03:00
ref(jsonrpc): Do not explicitly stop IO for provider
Since #4182 (35f50a8965) we no longer
need to stop IO explicitly, so let's not do that as it makes things
simpler to understand.
This commit is contained in:
@@ -1361,7 +1361,6 @@ impl CommandApi {
|
|||||||
/// Returns once a remote device has retrieved the backup.
|
/// Returns once a remote device has retrieved the backup.
|
||||||
async fn provide_backup(&self, account_id: u32) -> Result<()> {
|
async fn provide_backup(&self, account_id: u32) -> Result<()> {
|
||||||
let ctx = self.get_context(account_id).await?;
|
let ctx = self.get_context(account_id).await?;
|
||||||
ctx.stop_io().await;
|
|
||||||
let provider = match imex::BackupProvider::prepare(&ctx).await {
|
let provider = match imex::BackupProvider::prepare(&ctx).await {
|
||||||
Ok(provider) => provider,
|
Ok(provider) => provider,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
@@ -1369,9 +1368,7 @@ impl CommandApi {
|
|||||||
return Err(err);
|
return Err(err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let res = provider.await;
|
provider.await
|
||||||
ctx.start_io().await;
|
|
||||||
res
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the text of the QR code for the running [`CommandApi::provide_backup`].
|
/// Returns the text of the QR code for the running [`CommandApi::provide_backup`].
|
||||||
|
|||||||
Reference in New Issue
Block a user