fix cancelled p2p ft showing up as such

This commit is contained in:
Daniel Gultsch 2024-04-11 20:20:23 +02:00
parent c6289c442d
commit 13a879841f
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2

View file

@ -1243,6 +1243,10 @@ public class JingleFileTransferConnection extends AbstractJingleConnection
if (transition(target)) { if (transition(target)) {
// we change state before terminating transport so we don't consume the following // we change state before terminating transport so we don't consume the following
// IOException and turn it into a connectivity error // IOException and turn it into a connectivity error
if (isInitiator() && reason == Reason.CANCEL) {
this.message.setErrorMessage(Message.ERROR_MESSAGE_CANCELLED);
}
terminateTransport(); terminateTransport();
final JinglePacket jinglePacket = final JinglePacket jinglePacket =
new JinglePacket(JinglePacket.Action.SESSION_TERMINATE, id.sessionId); new JinglePacket(JinglePacket.Action.SESSION_TERMINATE, id.sessionId);