@Override
    public void shutdown() {

        // Terminate the automatic session invalidation thread
        executor.shutdownNow();

        // Forcibly invalidate any remaining sessions
        sessionMap.values().stream().forEach(GuacamoleSession::invalidate);

    }
Iterates through all active sessions, evicting those sessions which
are beyond the session timeout, or are marked as invalid. Internal
errors which would otherwise stop the session eviction process are
caught, logged, and the process is allowed to proceed.
guacamole/src/main/java/org/apache/guacamole/rest/auth/HashTokenSessionMap.java