mirror of https://github.com/v2ray/v2ray-core
fix multibuf len
parent
3137eba542
commit
e6446d43c8
|
@ -179,9 +179,13 @@ func (mb *MultiBuffer) WriteMultiBuffer(b MultiBuffer) error {
|
|||
}
|
||||
|
||||
// Len returns the total number of bytes in the MultiBuffer.
|
||||
func (mb MultiBuffer) Len() int32 {
|
||||
func (mb *MultiBuffer) Len() int32 {
|
||||
if mb == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size := int32(0)
|
||||
for _, b := range mb {
|
||||
for _, b := range *mb {
|
||||
size += b.Len()
|
||||
}
|
||||
return size
|
||||
|
|
Loading…
Reference in New Issue