Console: Don't show -1 active peers when in test mode

This commit is contained in:
zzz
2025-04-30 12:02:00 -04:00
parent 1f83d6122b
commit 2d3cb07097

View File

@ -74,9 +74,9 @@ public class VMCommSystem extends CommSystemFacade {
@Override
public X25519KeyFactory getXDHFactory() { return _xdhThread; }
public int countActivePeers() { return _commSystemFacades.size() - 1; }
public int countActivePeers() { return Math.max(_commSystemFacades.size() - 1, 0); }
public int countActiveSendPeers() { return _commSystemFacades.size() - 1; }
public int countActiveSendPeers() { return Math.max(_commSystemFacades.size() - 1, 0); }
public boolean isEstablished(Hash peer) { return _commSystemFacades.containsKey(peer); }