I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 66bbe21a authored by zzz's avatar zzz
Browse files

* Tunnels: Use consistent tunnel pair for Delivery Status Message

   to reduce network connections (ticket #1350)
parent 51995cc4
No related branches found
No related tags found
No related merge requests found
2014-08-18 zzz
* i2psnark:
- Don't send HTML-only headers for icons
- Catch IllegalStateException for icons
* Tunnels: Use consistent tunnel pair for Delivery Status Message
to reduce network connections (ticket #1350)
2014-08-15 zzz
* Console: Escaping fix (ticket #1348)
* I2CP: Lookup synch cleanups
......
......@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 5;
public final static long BUILD = 6;
/** for example "-test" */
public final static String EXTRA = "";
......
......@@ -729,7 +729,8 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
*
*/
private TunnelInfo selectInboundTunnel() {
return getContext().tunnelManager().selectInboundTunnel(_from.calculateHash());
// Use tunnel EP closest to his hash, as a simple cache to minimize connections
return getContext().tunnelManager().selectInboundTunnel(_from.calculateHash(), _to.calculateHash());
}
/**
......
......@@ -160,7 +160,8 @@ class InboundMessageDistributor implements GarlicMessageReceiver.CloveReceiver {
} else {
// ok, they want us to send it remotely, but that'd bust our anonymity,
// so we send it out a tunnel first
TunnelInfo out = _context.tunnelManager().selectOutboundTunnel(_client);
// TODO use the OCMOSJ cache to pick OB tunnel we are already using?
TunnelInfo out = _context.tunnelManager().selectOutboundTunnel(_client, target);
if (out == null) {
if (_log.shouldLog(Log.WARN))
_log.warn("no outbound tunnel to send the client message for " + _client + ": " + msg);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment