I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 75d86727 authored by zzz's avatar zzz
Browse files

SSU: Pull call out of loop for efficiency

parent 5c3e4087
No related branches found
No related tags found
No related merge requests found
......@@ -1927,8 +1927,9 @@ public class PeerState {
if (_dead)
return false;
final long messageId = bitfield.getMessageId();
if (bitfield.receivedComplete()) {
return acked(bitfield.getMessageId());
return acked(messageId);
}
OutboundMessageState state = null;
......@@ -1936,7 +1937,7 @@ public class PeerState {
synchronized (_outboundMessages) {
for (Iterator<OutboundMessageState> iter = _outboundMessages.iterator(); iter.hasNext(); ) {
state = iter.next();
if (state.getMessageId() == bitfield.getMessageId()) {
if (state.getMessageId() == messageId) {
boolean complete = state.acked(bitfield);
if (complete) {
isComplete = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment