This commit is contained in:
Jan Bartel 2017-04-27 12:47:30 +02:00
parent 776fd3e947
commit f9e9fd645d
2 changed files with 5 additions and 9 deletions

View File

@ -519,15 +519,11 @@ public class DefaultSessionIdManager extends ContainerLifeCycle implements Sessi
public Set<SessionHandler> getSessionHandlers() public Set<SessionHandler> getSessionHandlers()
{ {
Set<SessionHandler> handlers = new HashSet<>(); Set<SessionHandler> handlers = new HashSet<>();
Handler[] tmp = _server.getChildHandlersByClass(SessionHandler.class);
Handler[] contexts = _server.getChildHandlersByClass(ContextHandler.class); if (tmp != null)
for (int i=0; contexts!=null && i<contexts.length; i++)
{ {
SessionHandler sessionHandler = ((ContextHandler)contexts[i]).getChildHandlerByClass(SessionHandler.class); for (Handler h:tmp)
if (sessionHandler != null) handlers.add((SessionHandler)h);
{
handlers.add(sessionHandler);
}
} }
return handlers; return handlers;
} }

View File

@ -1257,7 +1257,7 @@ public class SessionHandler extends ScopedHandler
if (isStopping() || isStopped()) if (isStopping() || isStopped())
return; return;
if (LOG.isDebugEnabled()) LOG.debug("Scavenging sessions"); if (LOG.isDebugEnabled()) LOG.debug("{} scavenging sessions", this);
//Get a snapshot of the candidates as they are now. Others that //Get a snapshot of the candidates as they are now. Others that
//arrive during this processing will be dealt with on //arrive during this processing will be dealt with on
//subsequent call to scavenge //subsequent call to scavenge