mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
fix mb copy again
This commit is contained in:
parent
e0a2247a07
commit
9ee9af9e02
@ -392,21 +392,21 @@ func (c *Connection) WriteMultiBuffer(mb buf.MultiBuffer) error {
|
||||
}
|
||||
}()
|
||||
|
||||
mbPtr := &mb
|
||||
|
||||
for {
|
||||
for {
|
||||
if c == nil || c.State() != StateActive {
|
||||
return io.ErrClosedPipe
|
||||
}
|
||||
|
||||
mbPtr := &mb
|
||||
|
||||
if !c.sendingWorker.Push(func(bb []byte) (int, error) {
|
||||
return mbPtr.Read(bb[:c.mss])
|
||||
}) {
|
||||
break
|
||||
}
|
||||
updatePending = true
|
||||
if mb.IsEmpty() {
|
||||
if mbPtr.IsEmpty() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user