Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

fix: use origin expireNanoTime to init new clientRequestRound #105

Merged

Conversation

foreverneverer
Copy link
Contributor

@foreverneverer foreverneverer commented May 12, 2020

The #93 pr create new ClientRequestRound object when excute tryDelayCall:

tryDelayCall(
new ClientRequestRound(
round.operator, round.callback, round.enableCounter, round.timeoutMs),
tryId + 1);

it's expireNanoTime will be reset currentTime+timeout:
createNanoTime = System.nanoTime();
expireNanoTime = createNanoTime + timeoutMs * 1000000L;

then the

if (round.expireNanoTime - System.nanoTime() > nanoDelay) {

will be always true. In this case, the reuqest will not stop retry until it is successful.

This pr add new constructor to support use origin expireNanoTime to init it.

@acelyc111 acelyc111 merged commit 197c7ee into XiaoMi:thrift-0.11.0-inlined May 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants