Commit 25d492d4 authored by Dave Cridland's avatar Dave Cridland

Merge pull request #417 from surevine/dwd/OF-983

OF-983 Do not bounce packets while lock is held
parents 759f904b 2eb1e1e7
......@@ -590,17 +590,20 @@ public class LocalOutgoingServerSession extends LocalServerSession implements Ou
@Override
boolean canProcess(Packet packet) {
String senderDomain = packet.getFrom().getDomain();
boolean processed = true;
if (!getAuthenticatedDomains().contains(senderDomain)) {
synchronized (senderDomain.intern()) {
synchronized (("Auth::" + senderDomain).intern()) {
if (!getAuthenticatedDomains().contains(senderDomain) &&
!authenticateSubdomain(senderDomain, packet.getTo().getDomain())) {
// Return error since sender domain was not validated by remote server
returnErrorToSender(packet);
return false;
processed = false;
}
}
}
return true;
if (!processed) {
returnErrorToSender(packet);
}
return processed;
}
@Override
......
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