Commit acb142d2 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Throttle access to Shaj (JM-519).

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3328 b35dd754-fafc-0310-a699-88a17e54d16e
parent a0522ea6
......@@ -110,8 +110,12 @@ public class NativeAuthProvider implements AuthProvider {
public void authenticate(String username, String password) throws UnauthorizedException {
try {
if (!Shaj.checkPassword(domain, username, password)) {
throw new UnauthorizedException();
// Some native authentication mechanisms appear to not handle high load
// very well. Therefore, synchronize access to Shaj to throttle auth checks.
synchronized (this) {
if (!Shaj.checkPassword(domain, username, password)) {
throw new UnauthorizedException();
}
}
}
catch (UnauthorizedException ue) {
......
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