forked from I2P_Developers/i2p.i2p
2005-02-26 jrandom
* Further streaming lib caching improvements
* Reduce the minimum RTT (used to calculate retry timeouts), but also
increase the RTT on resends.
* Lower the default message size to 4KB from 16KB to further reduce the
chance of failed fragmentation.
* Extend tunnel rebuild throttling to include fallback rebuilds
* If there are less than 20 routers known, don't drop the last 20 (to help
avoid dropping all peers under catastrophic failures)
* New stats for end to end messages - "client.leaseSetFoundLocally",
"client.leaseSetFoundRemoteTime", and "client.leaseSetFailedRemoteTime"
This commit is contained in:
@@ -25,7 +25,6 @@ class PacketQueue {
|
||||
private I2PSession _session;
|
||||
private ConnectionManager _connectionManager;
|
||||
private ByteCache _cache = ByteCache.getInstance(64, 36*1024);
|
||||
private ByteCache _packetCache = ByteCache.getInstance(128, Packet.MAX_PAYLOAD_SIZE);
|
||||
|
||||
public PacketQueue(I2PAppContext context, I2PSession session, ConnectionManager mgr) {
|
||||
_context = context;
|
||||
@@ -129,7 +128,13 @@ class PacketQueue {
|
||||
|
||||
if ( (packet.getSequenceNum() == 0) && (!packet.isFlagSet(Packet.FLAG_SYNCHRONIZE)) ) {
|
||||
// ack only, so release it asap
|
||||
_packetCache.release(packet.getPayload());
|
||||
packet.releasePayload();
|
||||
} else if (packet.isFlagSet(Packet.FLAG_ECHO) && !packet.isFlagSet(Packet.FLAG_SIGNATURE_INCLUDED) ) {
|
||||
// pong
|
||||
packet.releasePayload();
|
||||
} else if (packet.isFlagSet(Packet.FLAG_RESET)) {
|
||||
// reset
|
||||
packet.releasePayload();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user