attempt fix FE p2p when

This commit is contained in:
PrototypeTrousers
2023-10-22 22:32:26 -03:00
parent e4d862dbfd
commit ba9b790a02
@@ -113,7 +113,7 @@ public class PartP2PFEPower extends PartP2PTunnel<PartP2PFEPower> {
return 0;
}
final int amountPerOutput = maxReceive / outputTunnels;
final int amountPerOutput = Math.max(1, maxReceive / outputTunnels);
int overflow = 0;
for (PartP2PFEPower o : PartP2PFEPower.this.getOutputs())
@@ -126,6 +126,11 @@ public class PartP2PFEPower extends PartP2PTunnel<PartP2PFEPower> {
overflow += amountPerOutput - received;
total += received;
if (total >= maxReceive) {
outputs.clear();
break;
}
}
if (overflow > 0) {