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

Skip to content
Snippets Groups Projects
Commit 5d3b7c1c authored by zzz's avatar zzz
Browse files

NetDB: Call fail callback when lookup is negative cached (thx zab)

parent cd977186
No related branches found
No related tags found
No related merge requests found
......@@ -597,6 +597,7 @@ public abstract class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacad
} else if (isNegativeCached(key)) {
if (_log.shouldInfo())
_log.info("Negative cached, not searching dest: " + key);
_context.jobQueue().addJob(onFinishedJob);
} else {
search(key, onFinishedJob, onFinishedJob, timeoutMs, true, fromLocalDest);
}
......@@ -634,6 +635,8 @@ public abstract class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacad
} else if (isNegativeCached(key)) {
if (_log.shouldInfo())
_log.info("Negative cached, not searching RI: " + key);
if (onFailedLookupJob != null)
_context.jobQueue().addJob(onFailedLookupJob);
} else {
search(key, onFindJob, onFailedLookupJob, timeoutMs, false);
}
......
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