Don't exclusively use explicitPeers when specified for testing

This commit is contained in:
zzz
2018-06-11 12:10:04 +00:00
parent 9c35a55969
commit 253c157ba8

View File

@@ -105,7 +105,8 @@ public abstract class TunnelPeerSelector extends ConnectChecker {
String peers = opts.getProperty("explicitPeers");
if (peers == null)
peers = ctx.getProperty("explicitPeers");
if (peers != null)
// only one out of 4 times so we don't break completely if peer doesn't build one
if (peers != null && ctx.random().nextInt(4) == 0)
return true;
}
return false;