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

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

* I2CP:

      - Include the Hash in the DestReplyMessage on a failed lookup
        so the client may correlate replies
        (file omitted from previous checkin)
parent cc4158a7
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,8 @@ class LookupDestJob extends JobImpl {
public String getName() { return "LeaseSet Lookup for Client"; }
public void runJob() {
DoneJob done = new DoneJob(getContext());
getContext().netDb().lookupLeaseSet(_hash, done, done, 10*1000);
// TODO add support for specifying the timeout in the lookup message
getContext().netDb().lookupLeaseSet(_hash, done, done, 15*1000);
}
private class DoneJob extends JobImpl {
......@@ -41,7 +42,7 @@ class LookupDestJob extends JobImpl {
if (ls != null)
returnDest(ls.getDestination());
else
returnDest(null);
returnHash(_hash);
}
}
......@@ -51,4 +52,15 @@ class LookupDestJob extends JobImpl {
_runner.doSend(msg);
} catch (I2CPMessageException ime) {}
}
/**
* Return the failed hash so the client can correlate replies with requests
* @since 0.8.3
*/
private void returnHash(Hash h) {
DestReplyMessage msg = new DestReplyMessage(h);
try {
_runner.doSend(msg);
} catch (I2CPMessageException ime) {}
}
}
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