GUACAMOLE-102: Clarification for comments on weights less than 1.

This commit is contained in:
Nick Couchman
2017-06-05 22:37:49 -04:00
parent 91f7a3e8e9
commit 955d5fb11f
2 changed files with 3 additions and 3 deletions

View File

@@ -175,8 +175,8 @@ public class ConnectionModel extends ChildObjectModel {
* Sets the connection weight.
*
* @param connectionWeight
* The weight of the connection. null is acceptable, negative values
* indicate that the connection should not be used.
* The weight of the connection. null is acceptable, and anything
* less than one will prevent the connection from being used.
*/
public void setConnectionWeight(Integer connectionWeight) {
this.connectionWeight = connectionWeight;

View File

@@ -216,7 +216,7 @@ public class RestrictedGuacamoleTunnelService
// Return the first unreserved connection
for (ModeledConnection connection : sortedConnections) {
// If connection weight is zero or negative, this host is disabled and should not be used.
// If connection weight is less than 1 this host is disabled and should not be used.
if (connection.getConnectionWeight() < 1) {
logger.debug("Weight for {} is < 1, connection will be skipped.", connection.getName());
continue;