Skip to content

Commit 4d4023a

Browse files
committed
fix bug and lint
1 parent b63bb4a commit 4d4023a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/migrations/github.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func (g *GithubDownloaderV3) SetContext(ctx context.Context) {
116116

117117
func (g *GithubDownloaderV3) sleep() {
118118
for g.rate != nil && g.rate.Remaining <= 0 {
119-
timer := time.NewTimer(time.Now().Sub(g.rate.Reset.Time))
119+
timer := time.NewTimer(time.Until(g.rate.Reset.Time))
120120
select {
121121
case <-g.ctx.Done():
122122
timer.Stop()

0 commit comments

Comments
 (0)