From 6494d7a45dabd180767890a310886146d83ae3be Mon Sep 17 00:00:00 2001 From: hrxi Date: Thu, 8 Aug 2019 17:12:02 +0200 Subject: 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. --- xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala | 1 + 1 file changed, 1 insertion(+) (limited to 'xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala') 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(); -- cgit v1.2.3-70-g09d2