mirror of https://github.com/apache/activemq.git
https://issues.apache.org/activemq/browse/AMQ-3052 - memory leak in SimpleAuthenticationBroker
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1038658 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aec047d08b
commit
9862d93d95
|
@ -92,7 +92,13 @@ public class SimpleAuthenticationBroker extends BrokerFilter {
|
|||
context.setSecurityContext(s);
|
||||
securityContexts.add(s);
|
||||
}
|
||||
super.addConnection(context, info);
|
||||
try {
|
||||
super.addConnection(context, info);
|
||||
} catch (Exception e) {
|
||||
securityContexts.remove(s);
|
||||
context.setSecurityContext(null);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error)
|
||||
|
|
Loading…
Reference in New Issue