forked from I2P_Developers/i2p.i2p
* Streaming, I2CP, Client Message sending:
Pass message timeout through new I2CP message SendMessageExpiresMessage, so that the router uses the same expiration as the streaming lib. Should help reliability. * I2CP: Implement new I2CP message ReconfigureSessionMessage. Will be used for tunnel reduction.
This commit is contained in:
@@ -82,7 +82,16 @@ class PacketQueue {
|
||||
|
||||
// this should not block!
|
||||
begin = _context.clock().now();
|
||||
sent = _session.sendMessage(packet.getTo(), buf, 0, size, keyUsed, tagsSent);
|
||||
long expires = 0;
|
||||
Connection.ResendPacketEvent rpe = (Connection.ResendPacketEvent) packet.getResendEvent();
|
||||
if (rpe != null)
|
||||
// we want the router to expire it a little before we do,
|
||||
// so if we retransmit it will use a new tunnel/lease combo
|
||||
expires = rpe.getNextSendTime() - 500;
|
||||
if (expires > 0)
|
||||
sent = _session.sendMessage(packet.getTo(), buf, 0, size, keyUsed, tagsSent, expires);
|
||||
else
|
||||
sent = _session.sendMessage(packet.getTo(), buf, 0, size, keyUsed, tagsSent);
|
||||
end = _context.clock().now();
|
||||
|
||||
if ( (end-begin > 1000) && (_log.shouldLog(Log.WARN)) )
|
||||
|
Reference in New Issue
Block a user