forked from I2P_Developers/i2p.i2p
less aggressive passive publishing
This commit is contained in:
@@ -64,6 +64,13 @@ class DataPublisherJob extends JobImpl {
|
|||||||
private Set selectKeysToSend() {
|
private Set selectKeysToSend() {
|
||||||
Set explicit = _facade.getExplicitSendKeys();
|
Set explicit = _facade.getExplicitSendKeys();
|
||||||
Set toSend = new HashSet(MAX_SEND_PER_RUN);
|
Set toSend = new HashSet(MAX_SEND_PER_RUN);
|
||||||
|
|
||||||
|
// if there's nothing we *need* to send, only send 10% of the time
|
||||||
|
if (explicit.size() <= 0) {
|
||||||
|
if (getContext().random().nextInt(9) <= 8)
|
||||||
|
return toSend;
|
||||||
|
}
|
||||||
|
|
||||||
if (explicit.size() < MAX_SEND_PER_RUN) {
|
if (explicit.size() < MAX_SEND_PER_RUN) {
|
||||||
toSend.addAll(explicit);
|
toSend.addAll(explicit);
|
||||||
_facade.removeFromExplicitSend(explicit);
|
_facade.removeFromExplicitSend(explicit);
|
||||||
|
Reference in New Issue
Block a user