From ce23d76c72d45dd4c1e64874674bdb9116f28221 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 4 Jun 2009 14:42:27 +0000 Subject: [PATCH] If we dont know any good floodfills, try to connect to one --- .../i2p/router/networkdb/kademlia/SingleLookupJob.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/SingleLookupJob.java b/router/java/src/net/i2p/router/networkdb/kademlia/SingleLookupJob.java index 8c40d117b..24c0350f9 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/SingleLookupJob.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/SingleLookupJob.java @@ -8,6 +8,12 @@ import net.i2p.util.Log; /** * Ask the peer who sent us the DSRM for the RouterInfos. + * + * If we have the routerInfo already, try to refetch it from that router itself, + * if we aren't already connected to that router, + * which will help us establish that router as a good floodfill and speed our + * integration into the network. + * * A simple version of SearchReplyJob in SearchJob.java. * Skip the profile updates - this should be rare. * @@ -28,6 +34,8 @@ class SingleLookupJob extends JobImpl { continue; if (getContext().netDb().lookupRouterInfoLocally(peer) == null) getContext().jobQueue().addJob(new SingleSearchJob(getContext(), peer, from)); + else if (!getContext().commSystem().isEstablished(peer)) + getContext().jobQueue().addJob(new SingleSearchJob(getContext(), peer, peer)); } } public String getName() { return "NetDb process DSRM"; }