通过管道收发推拉流事件

This commit is contained in:
yangjiechina
2023-12-01 19:16:52 +08:00
parent d3f37e63a6
commit 21792bf407
10 changed files with 291 additions and 123 deletions

View File

@@ -89,9 +89,9 @@ func (r *ringBuffer) All() ([]interface{}, []interface{}) {
return nil, nil
}
if r.head <= r.tail {
if r.tail <= r.head {
return r.data[r.head:], r.data[:r.tail]
} else {
return r.data[r.head:], nil
return r.data[r.head:r.tail], nil
}
}