fix: fix vmagent multi queue may become one because sync bug (#484)

Co-authored-by: xiaobeibei <xiaobeibei@bigo.sg>
This commit is contained in:
肖贝贝 2020-05-16 14:19:52 +08:00 committed by Aliaksandr Valialkin
parent dbf8048134
commit c154a92d29

View file

@ -120,7 +120,7 @@ func (fq *FastQueue) MustWriteBlock(block []byte) {
bb.B = append(bb.B[:0], block...)
fq.ch <- bb
fq.pendingInmemoryBytes += uint64(len(block))
if len(fq.ch) == 1 {
if len(fq.ch) >= 1 {
// Notify potentially blocked reader
fq.cond.Signal()
}