@Override
public void sessionDestroyed(final Session session, final HttpServerExchange exchange, final SessionDestroyedReason reason) {
ThreadSetupAction.Handle handle = null;
try {
final HttpSessionImpl httpSession = HttpSessionImpl.forSession(session, servletContext, false);
if (reason == SessionDestroyedReason.TIMEOUT) {
handle = threadSetup.setup(exchange);
}
applicationListeners.sessionDestroyed(httpSession);
//we make a defensive copy here, as there is no guarantee that the underlying session map