forked from I2P_Developers/i2p.i2p
NetDB: Call fail callback when lookup is negative cached (thx zab)
This commit is contained in:
@ -597,6 +597,7 @@ public abstract class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacad
|
|||||||
} else if (isNegativeCached(key)) {
|
} else if (isNegativeCached(key)) {
|
||||||
if (_log.shouldInfo())
|
if (_log.shouldInfo())
|
||||||
_log.info("Negative cached, not searching dest: " + key);
|
_log.info("Negative cached, not searching dest: " + key);
|
||||||
|
_context.jobQueue().addJob(onFinishedJob);
|
||||||
} else {
|
} else {
|
||||||
search(key, onFinishedJob, onFinishedJob, timeoutMs, true, fromLocalDest);
|
search(key, onFinishedJob, onFinishedJob, timeoutMs, true, fromLocalDest);
|
||||||
}
|
}
|
||||||
@ -634,6 +635,8 @@ public abstract class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacad
|
|||||||
} else if (isNegativeCached(key)) {
|
} else if (isNegativeCached(key)) {
|
||||||
if (_log.shouldInfo())
|
if (_log.shouldInfo())
|
||||||
_log.info("Negative cached, not searching RI: " + key);
|
_log.info("Negative cached, not searching RI: " + key);
|
||||||
|
if (onFailedLookupJob != null)
|
||||||
|
_context.jobQueue().addJob(onFailedLookupJob);
|
||||||
} else {
|
} else {
|
||||||
search(key, onFindJob, onFailedLookupJob, timeoutMs, false);
|
search(key, onFindJob, onFailedLookupJob, timeoutMs, false);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user