mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 00:06:30 +03:00
Log transfer rate on success
This commit is contained in:
@@ -446,10 +446,20 @@ async fn transfer_from_provider(
|
|||||||
}
|
}
|
||||||
|
|
||||||
drop(progress);
|
drop(progress);
|
||||||
res.map(|_| ()).map_err(|err| match connected {
|
match res {
|
||||||
true => TransferError::Other(err),
|
Ok(stats) => {
|
||||||
false => TransferError::ConnectionError(err),
|
info!(
|
||||||
})
|
context,
|
||||||
|
"Backup transfer finished, transfer rate is {} Mbps.",
|
||||||
|
stats.mbits()
|
||||||
|
);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
Err(err) => match connected {
|
||||||
|
true => Err(TransferError::Other(err)),
|
||||||
|
false => Err(TransferError::ConnectionError(err)),
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get callback when a blob is received from the provider.
|
/// Get callback when a blob is received from the provider.
|
||||||
|
|||||||
Reference in New Issue
Block a user