mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-23 23:53:08 +00:00
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:
1 parent
8a8452290c
commit
d2569fa446
5 files changed
+156
-41
No files matched your search
@@ -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