diff --git a/core/java/src/net/i2p/client/impl/I2PSessionImpl.java b/core/java/src/net/i2p/client/impl/I2PSessionImpl.java index 8dff24d15..ccadba047 100644 --- a/core/java/src/net/i2p/client/impl/I2PSessionImpl.java +++ b/core/java/src/net/i2p/client/impl/I2PSessionImpl.java @@ -554,6 +554,15 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2 synchronized (_leaseSetWait) { _leaseSetWait.notifyAll(); } + // Because of netdb isolation, a b32 lookup for a local dest ("loopback") + // would force the router to fetch the LS from a floodfill. + // Putting our dest in the lookup cache where other clients can + // get it allows immediate resolution. + Destination d = ls.getDestination(); + Hash h = d.calculateHash(); + synchronized (_lookupCache) { + _lookupCache.put(h, d); + } } }