bugfix: call Add() for WaitGroup

v4
suxb201 2 years ago
parent 3eb22dcf2b
commit d1376f6b7c
  1. 1
      internal/writer/redis.go

@ -31,6 +31,7 @@ func NewRedisWriter(address string, username string, password string, isTls bool
log.Infof("redisWriter connected to redis successful. address=[%s]", address) log.Infof("redisWriter connected to redis successful. address=[%s]", address)
rw.cmdBuffer = new(bytes.Buffer) rw.cmdBuffer = new(bytes.Buffer)
rw.chWaitReply = make(chan *entry.Entry, config.Config.Advanced.PipelineCountLimit) rw.chWaitReply = make(chan *entry.Entry, config.Config.Advanced.PipelineCountLimit)
rw.chWg.Add(1)
go rw.flushInterval() go rw.flushInterval()
return rw return rw
} }

Loading…
Cancel
Save