mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-17 18:06:15 -05:00
fix multibuf len
This commit is contained in:
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.
|
// 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)
|
size := int32(0)
|
||||||
for _, b := range mb {
|
for _, b := range *mb {
|
||||||
size += b.Len()
|
size += b.Len()
|
||||||
}
|
}
|
||||||
return size
|
return size
|
||||||
|
Loading…
Reference in New Issue
Block a user