Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed May 12, 2023
1 parent b19b82e commit 38fa449
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/utils/etcdutil/etcdutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,10 @@ func (lw *LoopWatcher) initFromEtcd(ctx context.Context) int64 {
watchStartRevision int64
err error
)
ctx, cancel := context.WithTimeout(ctx, lw.loadTimeout)
defer cancel()
ticker := time.NewTicker(defaultLoadFromEtcdRetryInterval)
defer ticker.Stop()
ctx, cancel := context.WithTimeout(ctx, lw.loadTimeout)
defer cancel()

for i := 0; i < lw.loadRetryTimes; i++ {
failpoint.Inject("loadTemporaryFail", func(val failpoint.Value) {
Expand Down

0 comments on commit 38fa449

Please sign in to comment.