diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-09-03 19:59:51 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-09-03 19:59:51 +0200 |
commit | 4aa24e84c49348f8d96c273f77a636557dbb40a2 (patch) | |
tree | 745f1e6a44a4cef2e2dfb41f3a53c563da84b129 /src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnectionManager.java | |
parent | 9cd6fa50972da7e012185e4ede49bc52609a2e81 (diff) |
use higher priority for proxy on receiving end
Diffstat (limited to 'src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnectionManager.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnectionManager.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnectionManager.java b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnectionManager.java index bef7a000d..068924bca 100644 --- a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnectionManager.java +++ b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnectionManager.java @@ -81,8 +81,7 @@ public class JingleConnectionManager extends AbstractConnectionManager { this.connections.remove(connection); } - public void getPrimaryCandidate(Account account, - final OnPrimaryCandidateFound listener) { + public void getPrimaryCandidate(final Account account, final boolean initiator, final OnPrimaryCandidateFound listener) { if (Config.DISABLE_PROXY_LOOKUP) { listener.onPrimaryCandidateFound(false, null); return; @@ -107,7 +106,7 @@ public class JingleConnectionManager extends AbstractConnectionManager { candidate.setPort(Integer.parseInt(port)); candidate.setType(JingleCandidate.TYPE_PROXY); candidate.setJid(proxy); - candidate.setPriority(655360 + 65535); + candidate.setPriority(655360 + (initiator ? 10 : 20)); primaryCandidates.put(account.getJid().asBareJid(), candidate); listener.onPrimaryCandidateFound(true, candidate); } catch (final NumberFormatException e) { |