mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
GUACAMOLE-102: Adding some commentary for changes in the RestrictedGuacamoleTunnelService class.
This commit is contained in:
committed by
Nick Couchman
parent
d1259ef8df
commit
2363c63e64
@@ -190,11 +190,15 @@ public class RestrictedGuacamoleTunnelService
|
|||||||
logger.debug("Calculating weights for connections {} and {}.", a.getName(), b.getName());
|
logger.debug("Calculating weights for connections {} and {}.", a.getName(), b.getName());
|
||||||
int cw = 0;
|
int cw = 0;
|
||||||
int weightA = a.getConnectionWeight();
|
int weightA = a.getConnectionWeight();
|
||||||
|
// If the weight is null, we go ahead and sort, anyway
|
||||||
if (weightA == null)
|
if (weightA == null)
|
||||||
weightA = 0;
|
weightA = 0;
|
||||||
|
|
||||||
|
// If the weight is null, we go ahead and sort, anyway
|
||||||
int weightB = b.getConnectionWeight();
|
int weightB = b.getConnectionWeight();
|
||||||
if (weightB == null)
|
if (weightB == null)
|
||||||
weightB = 0;
|
weightB = 0;
|
||||||
|
|
||||||
int connsA = getActiveConnections(a).size();
|
int connsA = getActiveConnections(a).size();
|
||||||
int connsB = getActiveConnections(b).size();
|
int connsB = getActiveConnections(b).size();
|
||||||
logger.debug("Connection {} has computed weight of {}.", a.getName(), connsA * 10000 / weightA);
|
logger.debug("Connection {} has computed weight of {}.", a.getName(), connsA * 10000 / weightA);
|
||||||
|
Reference in New Issue
Block a user