SSU: Minor cleanup of congestion checkin

This commit is contained in:
zzz
2020-10-23 16:05:39 +00:00
parent 9b3ff9e615
commit 15da2f85ad
2 changed files with 3 additions and 11 deletions

View File

@ -1712,16 +1712,8 @@ public class PeerState {
if (should) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Allocate sending (OLD) to " + _remotePeer + ": " + state.getMessageId());
/*
while (iter.hasNext()) {
OutboundMessageState later = (OutboundMessageState)iter.next();
OutNetMessage msg = later.getMessage();
if (msg != null)
msg.timestamp("not reached for allocation " + msgs.size() + " other peers");
}
*/
if (rv == null)
rv = new ArrayList<OutboundMessageState>(_outboundMessages.size());
rv = new ArrayList<OutboundMessageState>((1 + _outboundMessages.size()) / 2);
rv.add(state);
if (rv.size() >= _outboundMessages.size() / 2)
return rv;
@ -1740,7 +1732,7 @@ public class PeerState {
return rv;
}
}
return null;
return rv;
}
// Peek at head of _outboundQueue and see if we can send it.
// If so, pull it off, put it in _outbundMessages, test

View File

@ -347,7 +347,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
}
/**
* @returns the instance of OutboundMessageFragments
* @return the instance of OutboundMessageFragments
* @since 0.9.48
*/
OutboundMessageFragments getOMF() {