1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-02 23:47:07 -05:00

fix multibuffer copy

This commit is contained in:
Darien Raymond 2018-07-29 03:13:29 +02:00
parent 8c7fcad414
commit 354ef3c27d
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -398,8 +398,10 @@ func (c *Connection) WriteMultiBuffer(mb buf.MultiBuffer) error {
return io.ErrClosedPipe
}
mbPtr := &mb
if !c.sendingWorker.Push(func(bb []byte) (int, error) {
return mb.Read(bb[:c.mss])
return mbPtr.Read(bb[:c.mss])
}) {
break
}