2006-04-12 jrandom
* Added a further failsafe against trying to queue up too many messages to a peer.
This commit is contained in:
@ -1,4 +1,8 @@
|
||||
$Id: history.txt,v 1.452 2006/04/11 08:39:07 jrandom Exp $
|
||||
$Id: history.txt,v 1.453 2006/04/12 01:49:04 jrandom Exp $
|
||||
|
||||
2006-04-12 jrandom
|
||||
* Added a further failsafe against trying to queue up too many messages to
|
||||
a peer.
|
||||
|
||||
2006-04-12 jrandom
|
||||
* Watch out for failed syndie index fetches (thanks bar!)
|
||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.392 $ $Date: 2006/04/11 08:39:09 $";
|
||||
public final static String ID = "$Revision: 1.393 $ $Date: 2006/04/12 01:49:05 $";
|
||||
public final static String VERSION = "0.6.1.14";
|
||||
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);
|
||||
|
@ -61,7 +61,7 @@ public class OutboundMessageFragments {
|
||||
_context.statManager().createRateStat("udp.sendConfirmVolley", "How many times did fragments need to be sent before ACK", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||
_context.statManager().createRateStat("udp.sendFailed", "How many sends a failed message was pushed", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||
_context.statManager().createRateStat("udp.sendAggressiveFailed", "How many volleys was a packet sent before we gave up", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||
_context.statManager().createRateStat("udp.outboundActiveCount", "How many messages are in the active pool", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||
_context.statManager().createRateStat("udp.outboundActiveCount", "How many messages are in the peer's active pool", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||
_context.statManager().createRateStat("udp.sendRejected", "What volley are we on when the peer was throttled (time == message lifetime)", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||
_context.statManager().createRateStat("udp.partialACKReceived", "How many fragments were partially ACKed (time == message lifetime)", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||
_context.statManager().createRateStat("udp.sendSparse", "How many fragments were partially ACKed and hence not resent (time == message lifetime)", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||
|
@ -1013,7 +1013,12 @@ public class PeerState {
|
||||
int rv = 0;
|
||||
boolean fail = false;
|
||||
synchronized (msgs) {
|
||||
if (_retransmitter != null) {
|
||||
rv = msgs.size() + 1;
|
||||
if (rv > 32) {
|
||||
// 32 queued messages? to *one* peer? nuh uh.
|
||||
fail = true;
|
||||
rv--;
|
||||
} else if (_retransmitter != null) {
|
||||
long lifetime = _retransmitter.getLifetime();
|
||||
long totalLifetime = lifetime;
|
||||
for (int i = 1; i < msgs.size(); i++) { // skip the first, as thats the retransmitter
|
||||
@ -1049,7 +1054,6 @@ public class PeerState {
|
||||
} else {
|
||||
msgs.add(state);
|
||||
}
|
||||
rv = msgs.size();
|
||||
}
|
||||
if (fail)
|
||||
_transport.failed(state, false);
|
||||
|
Reference in New Issue
Block a user