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

fix: incorrect expire time of client request #164

Merged
merged 9 commits into from
Sep 28, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.xiaomi.infra.pegasus.operator.client_operator;
import com.xiaomi.infra.pegasus.rpc.Table;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;

/** Created by weijiesun on 16-11-25. */
Expand Down Expand Up @@ -56,7 +57,7 @@ public ClientRequestRound(

this.enableCounter = enableCounter;
this.createNanoTime = System.nanoTime();
this.expireNanoTime = createNanoTime + timeoutInMilliseconds;
this.expireNanoTime = createNanoTime + TimeUnit.MILLISECONDS.toNanos(timeoutInMilliseconds);
this.isCompleted = false;
this.tryId = 1;
this.backupRequestTask = null;
Expand Down