Skip to content
Snippets Groups Projects
Unverified Commit 282a5e62 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

datatransfer: do not emit failures for outgoing files

In a swarm, if something is wrong, the peer will retry the connection
but for the sender, they have the file so they should be able to see
it and should not see any "Cancelled" error here.
However, in the future, we will need to update the API to provide
status per users and what peers received the file.

Change-Id: Id02ea3f6552557bdc01d3f13504b5b81efb443e9
parent 1317bb33
No related branches found
No related tags found
No related merge requests found
......@@ -778,6 +778,12 @@ OutgoingFile::process()
} catch (...) {
}
if (!isUserCancelled_) {
// NOTE: emit(code) MUST be changed to improve handling of multiple destinations
// But for now, we can just avoid to emit errors to the client, because for outgoing
// transfer in a swarm, for outgoingFiles, we know that the file is ok. And the peer
// will retry the transfer if they need, so we don't need to show errors.
if (interactionId_.empty() && !correct)
return;
auto code = correct ? DRing::DataTransferEventCode::finished
: DRing::DataTransferEventCode::closed_by_peer;
emit(code);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment