mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-06-09 15:01:42 +00:00
* delay the ack of a syn
* make sure we ack duplicate messages received (if we aren't already doing so) * implement a choke on the local buffer, in case we receive data faster than its removed from the i2psocket's MessageInputStream (handle via packet drop and explicit congestion notification)
This commit is contained in:
@@ -31,10 +31,15 @@ class SchedulerReceived extends SchedulerImpl {
|
||||
|
||||
long timeTillSend = con.getNextSendTime() - _context.clock().now();
|
||||
if (timeTillSend <= 0) {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("received con... send a packet");
|
||||
con.sendAvailable();
|
||||
con.setNextSendTime(-1);
|
||||
if (con.getNextSendTime() > 0) {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("received con... send a packet");
|
||||
con.sendAvailable();
|
||||
con.setNextSendTime(-1);
|
||||
} else {
|
||||
con.setNextSendTime(_context.clock().now() + con.getOptions().getSendAckDelay());
|
||||
reschedule(con.getOptions().getSendAckDelay(), con);
|
||||
}
|
||||
} else {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("received con... time till next send: " + timeTillSend);
|
||||
|
||||
Reference in New Issue
Block a user