necouchman commented on code in PR #1117:
URL: https://github.com/apache/guacamole-client/pull/1117#discussion_r2353929765


##########
guacamole/src/main/java/org/apache/guacamole/GuacamoleSession.java:
##########
@@ -61,6 +62,11 @@ public class GuacamoleSession {
      */
     private final Map<String, UserTunnel> tunnels = new ConcurrentHashMap<>();
 
+    /**
+     * Creation times for all tunnels, indexed by tunnel UUID.
+     */
+    private final Map<String, Long> tunnelCreationTimes = new 
ConcurrentHashMap<>();
+

Review Comment:
   Well, the `tunnels` `Map`, directly above this, has all currently active 
tunnels indexed by UUID. So, you should just be able to iterate through 
`tunnels` and, for each tunnel, grab the creation time and close it if it has 
expired. I think the only real substantive change over what you're already 
doing is that, instead of tracking tunnel creation time in a separate `Map` 
you're just using the already-implemented map and iterating through that?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to