diff --git a/router/java/src/net/i2p/router/tunnel/InboundGatewayReceiver.java b/router/java/src/net/i2p/router/tunnel/InboundGatewayReceiver.java index 8c56379d07606a29203d6a7ed88927315abbdf7d..ffb4c356bf45eda1ec5db64ca8ec9ea18b411e1c 100644 --- a/router/java/src/net/i2p/router/tunnel/InboundGatewayReceiver.java +++ b/router/java/src/net/i2p/router/tunnel/InboundGatewayReceiver.java @@ -41,7 +41,7 @@ public class InboundGatewayReceiver implements TunnelGateway.Receiver { out.setMessage(msg); out.setTarget(_target); out.setExpiration(msg.getMessageExpiration()); - out.setPriority(400); + out.setPriority(200); _context.outNetMessagePool().add(out); return msg.getUniqueId(); } diff --git a/router/java/src/net/i2p/router/tunnel/OutboundMessageDistributor.java b/router/java/src/net/i2p/router/tunnel/OutboundMessageDistributor.java index 8e07dd697c914d11181cd6f46dea1e093ae22691..5bc09b883d11f7ebbce0f6b84ad5de6e74443914 100644 --- a/router/java/src/net/i2p/router/tunnel/OutboundMessageDistributor.java +++ b/router/java/src/net/i2p/router/tunnel/OutboundMessageDistributor.java @@ -16,12 +16,14 @@ import net.i2p.util.Log; */ public class OutboundMessageDistributor { private RouterContext _context; + private int _priority; private Log _log; private static final int MAX_DISTRIBUTE_TIME = 10*1000; - public OutboundMessageDistributor(RouterContext ctx) { + public OutboundMessageDistributor(RouterContext ctx, int priority) { _context = ctx; + _priority = priority; _log = ctx.logManager().getLog(OutboundMessageDistributor.class); } @@ -62,7 +64,7 @@ public class OutboundMessageDistributor { out.setExpiration(_context.clock().now() + MAX_DISTRIBUTE_TIME); out.setTarget(target); out.setMessage(m); - out.setPriority(400); + out.setPriority(_priority); if (_log.shouldLog(Log.DEBUG)) _log.debug("queueing outbound message to " + target.getIdentity().calculateHash().toBase64().substring(0,4)); diff --git a/router/java/src/net/i2p/router/tunnel/OutboundTunnelEndpoint.java b/router/java/src/net/i2p/router/tunnel/OutboundTunnelEndpoint.java index e641f50cb5b35479675e8d4536e95d7b74001152..18c2caefb42980e294644d1859753a08dae9850d 100644 --- a/router/java/src/net/i2p/router/tunnel/OutboundTunnelEndpoint.java +++ b/router/java/src/net/i2p/router/tunnel/OutboundTunnelEndpoint.java @@ -26,7 +26,7 @@ public class OutboundTunnelEndpoint { _config = config; _processor = processor; _handler = new RouterFragmentHandler(ctx, new DefragmentedHandler()); - _outDistributor = new OutboundMessageDistributor(ctx); + _outDistributor = new OutboundMessageDistributor(ctx, 200); } public void dispatch(TunnelDataMessage msg, Hash recvFrom) { _config.incrementProcessedMessages(); @@ -44,4 +44,4 @@ public class OutboundTunnelEndpoint { _outDistributor.distribute(msg, toRouter, toTunnel); } } -} \ No newline at end of file +} diff --git a/router/java/src/net/i2p/router/tunnel/TunnelGatewayZeroHop.java b/router/java/src/net/i2p/router/tunnel/TunnelGatewayZeroHop.java index a15ee91d8d15b3898cfe5f4e958d9d1e9c371d35..1abceb9f25e85afccfd3a76e0ca77b67da205c04 100644 --- a/router/java/src/net/i2p/router/tunnel/TunnelGatewayZeroHop.java +++ b/router/java/src/net/i2p/router/tunnel/TunnelGatewayZeroHop.java @@ -29,7 +29,7 @@ public class TunnelGatewayZeroHop extends TunnelGateway { if (config.isInbound()) _inDistributor = new InboundMessageDistributor(_context, config.getDestination()); else - _outDistributor = new OutboundMessageDistributor(context); + _outDistributor = new OutboundMessageDistributor(context, 400); } /** diff --git a/router/java/src/net/i2p/router/tunnel/TunnelParticipant.java b/router/java/src/net/i2p/router/tunnel/TunnelParticipant.java index fe2aa95226b6731a9e0cf649005a733b0af20767..af334ea7054db07a29d565d4f4b2c6813ca2e965 100644 --- a/router/java/src/net/i2p/router/tunnel/TunnelParticipant.java +++ b/router/java/src/net/i2p/router/tunnel/TunnelParticipant.java @@ -157,7 +157,7 @@ public class TunnelParticipant { m.setMessage(msg); m.setExpiration(msg.getMessageExpiration()); m.setTarget(ri); - m.setPriority(400); + m.setPriority(200); if (_log.shouldLog(Log.DEBUG)) _log.debug("Forward on from " + _config + ": " + msg); _context.outNetMessagePool().add(m);