aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala
diff options
context:
space:
mode:
authorhrxi <hrrrxi@gmail.com>2019-08-08 17:12:02 +0200
committerhrxi <hrrrxi@gmail.com>2019-08-08 17:15:37 +0200
commit6494d7a45dabd180767890a310886146d83ae3be (patch)
tree6707217d24c1fdcb7265e8e4496a0adc7ac0ab27 /xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala
parent9a1e9864d6ea5bc967a69b2245ead55ba7c05812 (diff)
downloaddino-6494d7a45dabd180767890a310886146d83ae3be.tar.gz
dino-6494d7a45dabd180767890a310886146d83ae3be.zip
Fix race condition involving `session-terminate`
The Jingle file transfer (XEP-0234) specifies that the receiver of the file transfer is the one to terminate the session. Otherwise, there might be a race condition between the XMPP stream and out-of-band SOCKS5 connections.
Diffstat (limited to 'xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala')
-rw-r--r--xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala1
1 files changed, 1 insertions, 0 deletions
diff --git a/xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala b/xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala
index 867a26e3..43c212f5 100644
--- a/xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala
+++ b/xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala
@@ -45,6 +45,7 @@ public class Module : Jingle.ContentType, XmppStreamModule {
Jingle.Session session = stream.get_module(Jingle.Module.IDENTITY)
.create_session(stream, Jingle.TransportType.STREAMING, receiver_full_jid, Jingle.Senders.INITIATOR, "a-file-offer", description); // TODO(hrxi): Why "a-file-offer"?
+ session.terminate_on_connection_close = false;
yield session.conn.input_stream.close_async();