aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala')
-rw-r--r--xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala b/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala
index 991ea141..c6556eb7 100644
--- a/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala
+++ b/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala
@@ -116,7 +116,11 @@ public class Candidate : Socks5Bytestreams.Proxy {
string? cid = candidate.get_attribute("cid");
string? host = candidate.get_attribute("host");
string? jid_str = candidate.get_attribute("jid");
- Jid? jid = jid_str != null ? Jid.parse(jid_str) : null;
+ Jid? jid = null;
+ try {
+ jid = new Jid(jid_str);
+ } catch (InvalidJidError ignored) {
+ }
int port = candidate.get_attribute("port") != null ? candidate.get_attribute_int("port") : 1080;
int priority = candidate.get_attribute_int("priority");
string? type_str = candidate.get_attribute("type");