Fix PeerState

This commit is contained in:
slumlord
2018-08-06 15:13:41 +00:00
parent 7084c86e76
commit 57fee62557

View File

@@ -16,7 +16,7 @@ import net.i2p.data.Hash;
import net.i2p.data.SessionKey;
import net.i2p.router.OutNetMessage;
import net.i2p.router.RouterContext;
import net.i2p.router.util.CachedIteratorAbstractCollection;
import net.i2p.router.util.CachedIteratorCollection;
import net.i2p.router.util.PriBlockingQueue;
import net.i2p.util.Log;
import net.i2p.util.ConcurrentHashSet;
@@ -208,7 +208,7 @@ public class PeerState {
* Mostly messages that have been transmitted and are awaiting acknowledgement,
* although there could be some that have not been sent yet.
*/
private final CachedIteratorAbstractCollection<OutboundMessageState> _outboundMessages;
private final CachedIteratorCollection<OutboundMessageState> _outboundMessages;
/**
* Priority queue of messages that have not yet been sent.
@@ -368,7 +368,7 @@ public class PeerState {
_rtt = INIT_RTT;
_rttDeviation = _rtt;
_inboundMessages = new HashMap<Long, InboundMessageState>(8);
_outboundMessages = new CachedIteratorAbstractCollection<OutboundMessageState>();
_outboundMessages = new CachedIteratorCollection<OutboundMessageState>();
//_outboundQueue = new CoDelPriorityBlockingQueue(ctx, "UDP-PeerState", 32);
_outboundQueue = new PriBlockingQueue<OutboundMessageState>(ctx, "UDP-PeerState", 32);
// all createRateStat() moved to EstablishmentManager
@@ -1584,7 +1584,7 @@ public class PeerState {
iter.remove();
if (_retransmitter == state)
_retransmitter = null;
_log.debug("CachedIteratorAbstractCollection: sendFailed update" + state);
_log.debug("CachedIteratorCollection: sendFailed update" + state);
_context.statManager().addRateData("udp.sendFailed", state.getPushCount());
if (failed == null) failed = new ArrayList<OutboundMessageState>(4);
failed.add(state);
@@ -1592,7 +1592,7 @@ public class PeerState {
iter.remove();
if (state == _retransmitter)
_retransmitter = null;
_log.debug("CachedIteratorAbstractCollection: sendAggressiveFailed update" + state);
_log.debug("CachedIteratorCollection: sendAggressiveFailed update" + state);
_context.statManager().addRateData("udp.sendAggressiveFailed", state.getPushCount());
if (failed == null) failed = new ArrayList<OutboundMessageState>(4);
failed.add(state);