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 GitHub
parent 3a68c47de0
commit a0380a0a91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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()
}