Commit 9db375dd authored by Dave Cridland's avatar Dave Cridland Committed by Guus der Kinderen

OF-1309 Check remote is not present before adding new DomainPair

parent 2e1f93f0
......@@ -666,11 +666,11 @@ public class LocalOutgoingServerSession extends LocalServerSession implements Ou
@Override
public void addOutgoingDomainPair(String localDomain, String remoteDomain) {
outgoingDomainPairs.add(new DomainPair(localDomain, remoteDomain));
boolean found = false;
for (DomainPair domainPair : outgoingDomainPairs) {
if (domainPair.getRemote().equals(remoteDomain)) found = true;
}
outgoingDomainPairs.add(new DomainPair(localDomain, remoteDomain));
if (!found) {
XMPPServer.getInstance().getRoutingTable().addServerRoute(new JID(null, remoteDomain, null, true), this);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment