diff --git a/cmd/mtwebmapper/tilesupdater.go b/cmd/mtwebmapper/tilesupdater.go index 11df3c3..ab1690e 100644 --- a/cmd/mtwebmapper/tilesupdater.go +++ b/cmd/mtwebmapper/tilesupdater.go @@ -100,7 +100,7 @@ func (tu *tileUpdater) doUpdates() { jobs := make(chan xz) var done sync.WaitGroup - for i := 0; i < tu.workers; i++ { + for i, n := 0, min(tu.workers, len(changes)); i < n; i++ { var client *common.RedisClient var err error if client, err = common.NewRedisClient("tcp", tu.redisAddress); err != nil {