Author: robert
Date: 2008-01-23 16:14:55 +0000 (Wed, 23 Jan 2008)
New Revision: 17208
Modified:
trunk/freenet/src/freenet/io/xfer/PartiallyReceivedBlock.java
Log:
don't pass along reduplicated packets
Modified: trunk/freenet/src/freenet/io/xfer/PartiallyReceivedBlock.java
===================================================================
--- trunk/freenet/src/freenet/io/xfer/PartiallyReceivedBlock.java
2008-01-23 15:32:13 UTC (rev 17207)
+++ trunk/freenet/src/freenet/io/xfer/PartiallyReceivedBlock.java
2008-01-23 16:14:55 UTC (rev 17208)
@@ -107,9 +107,10 @@
if (packet.getLength() != _packetSize) {
throw new RuntimeException("New packet size
"+packet.getLength()+" but expecting packet of size "+_packetSize);
}
- if (!_received[position]) {
- _receivedCount++;
- }
+ if (_received[position])
+ return;
+
+ _receivedCount++;
packet.copyTo(_data, position * _packetSize);
_received[position] = true;