sschiffli commented on code in PR #1147:
URL: https://github.com/apache/guacamole-client/pull/1147#discussion_r2666925584


##########
guacamole-common-js/src/main/webapp/modules/IntegerPool.js:
##########
@@ -51,13 +58,17 @@ Guacamole.IntegerPool = function() {
     /**
      * Returns the next available integer in the pool. If possible, a 
previously
      * used integer will be returned.
-     * 
+     *
      * @return {!number}
      *     The next available integer.
      */
     this.next = function() {
 
-        // If free'd integers exist, return one of those
+        // If min_size is specified, prefer new integers until we reach it
+        if (min_size && guac_pool.next_int < min_size)
+            return guac_pool.next_int++;

Review Comment:
   Good call, that is much easier to read



-- 
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