I2CP: More BlindingInfo serialization fixes

Shorten lookup timeout on router side so the client gets the reply before timeout
This commit is contained in:
zzz
2019-09-18 12:37:26 +00:00
parent f9a2193e2f
commit 2b6cb2099a
4 changed files with 29 additions and 6 deletions

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 7;
public final static long BUILD = 8;
/** for example "-test" */
public final static String EXTRA = "";

View File

@ -179,8 +179,12 @@ class LookupDestJob extends JobImpl {
}
} else if (_hash != null) {
DoneJob done = new DoneJob(getContext());
// shorten timeout so we can respond before the client side times out
long timeout = _timeout;
if (timeout > 1500)
timeout -= 500;
// TODO tell router this is an encrypted lookup, skip 38 or earlier ffs?
getContext().netDb().lookupDestination(_hash, done, _timeout, _fromLocalDest);
getContext().netDb().lookupDestination(_hash, done, timeout, _fromLocalDest);
} else {
// blinding decode fail
returnFail(HostReplyMessage.RESULT_DECRYPTION_FAILURE);