mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-317: Always prefer non-failover connections relative to failover-only connections.
This commit is contained in:
@@ -187,6 +187,15 @@ public class RestrictedGuacamoleTunnelService
|
||||
@Override
|
||||
public int compare(ModeledConnection a, ModeledConnection b) {
|
||||
|
||||
// Always prefer non-failover connections to those which are
|
||||
// failover-only
|
||||
if (a.isFailoverOnly()) {
|
||||
if (!b.isFailoverOnly())
|
||||
return 1;
|
||||
}
|
||||
else if (b.isFailoverOnly())
|
||||
return -1;
|
||||
|
||||
// Active connections
|
||||
int connA = getActiveConnections(a).size();
|
||||
int connB = getActiveConnections(b).size();
|
||||
|
Reference in New Issue
Block a user