mirror of
https://github.com/i2p/i2p.i2p.git
synced 2024-12-06 19:27:00 +01:00
2005-10-13 jrandom
* SSU retransmission choke bugfix (== != !=)
* Include initial transmissions in the retransmission choke, so that
if we are already retransmitting a message, we won't send anything
to that peer other than that message (or ACKs, if necessary)
This commit is contained in:
@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.266 $ $Date: 2005/10/11 16:05:14 $";
|
||||
public final static String ID = "$Revision: 1.267 $ $Date: 2005/10/12 22:54:54 $";
|
||||
public final static String VERSION = "0.6.1.2";
|
||||
public final static long BUILD = 7;
|
||||
public final static long BUILD = 8;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
||||
@@ -344,6 +344,14 @@ public class OutboundMessageFragments {
|
||||
_log.info("Fragmenting " + state);
|
||||
}
|
||||
|
||||
OutboundMessageState curRetransMsg = (OutboundMessageState)_retransmitters.get(peer);
|
||||
if ( (curRetransMsg != null) && (curRetransMsg != state) ) {
|
||||
// choke it, since there's already another message retransmitting to this
|
||||
// peer.
|
||||
_context.statManager().addRateData("udp.blockedRetransmissions", peer.getPacketsRetransmitted(), peer.getPacketsTransmitted());
|
||||
return false;
|
||||
}
|
||||
|
||||
int size = state.getUnackedSize();
|
||||
if (peer.allocateSendingBytes(size)) {
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
@@ -354,17 +362,8 @@ public class OutboundMessageFragments {
|
||||
+ " for message " + state.getMessageId() + ": " + state);
|
||||
|
||||
if (state.getPushCount() > 0) {
|
||||
OutboundMessageState curRetransMsg = (OutboundMessageState)_retransmitters.get(peer);
|
||||
if ( (curRetransMsg != null) && (curRetransMsg == state) ) {
|
||||
// choke it, there's already another message to this peer in flight
|
||||
// perhaps we should release the sendingBytes? or maybe not, since we
|
||||
// *do* want to choke the peer...
|
||||
_context.statManager().addRateData("udp.blockedRetransmissions", peer.getPacketsRetransmitted(), peer.getPacketsTransmitted());
|
||||
return false;
|
||||
} else {
|
||||
_retransmitters.put(peer, state);
|
||||
}
|
||||
|
||||
_retransmitters.put(peer, state);
|
||||
|
||||
int fragments = state.getFragmentCount();
|
||||
int toSend = 0;
|
||||
for (int i = 0; i < fragments; i++) {
|
||||
|
||||
Reference in New Issue
Block a user