Compare commits

...

1 Commits

Author SHA1 Message Date
Floris Bruynooghe
6325d80457 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.
2023-03-21 12:27:04 +01:00

View File

@@ -1361,7 +1361,6 @@ 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) => {
@@ -1369,9 +1368,7 @@ impl CommandApi {
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`].