diff --git a/lib/imgbundler/imgbundler.go b/lib/imgbundler/imgbundler.go index c0e7eec5d..0935f8637 100644 --- a/lib/imgbundler/imgbundler.go +++ b/lib/imgbundler/imgbundler.go @@ -122,11 +122,13 @@ func runWorkers(ctx context.Context, ms *xmain.State, svg []byte, imgs [][][]byt } }() + t := time.NewTicker(time.Second * 5) + defer t.Stop() for { select { case <-ctx.Done(): return svg, xerrors.Errorf("failed to wait for workers: %w", ctx.Err()) - case <-time.After(time.Second * 5): + case <-t.C: ms.Log.Info.Printf("fetching images...") case repl, ok := <-replc: if !ok {