forked from I2P_Developers/i2p.i2p
i2psnark: Don't count unchoked but uninterested peers as uploaders
when calculating global uploader limit, to allow more upload slots, especially when some torrents are stalled. Convert some shared fields to atomics for concurrency.
This commit is contained in:
@@ -1337,7 +1337,7 @@ public class Snark
|
||||
int totalUploaders = 0;
|
||||
for (PeerCoordinator c : _peerCoordinatorSet) {
|
||||
if (!c.halted())
|
||||
totalUploaders += c.uploaders;
|
||||
totalUploaders += c.getInterestedUploaders();
|
||||
}
|
||||
int limit = _util.getMaxUploaders();
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
|
||||
Reference in New Issue
Block a user