release ticker correctly

Signed-off-by: hang.jiang <hang.jiang@daocloud.io>
This commit is contained in:
hang.jiang 2023-06-07 11:45:38 +08:00
parent 87dbdd2ca1
commit d18026592f

View File

@ -87,6 +87,7 @@ func (j *ProgressTracker) HandleProgress(ctx context.Context, pf transfer.Progre
// Instead of ticker, just delay
jobs := map[digest.Digest]*jobStatus{}
tc := time.NewTicker(time.Millisecond * 300)
defer tc.Stop()
update := func() {
// TODO: Filter by references