Browse Source

fix multibuffer copy

pull/1524/head^2
Darien Raymond 6 years ago
parent
commit
354ef3c27d
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
  1. 4
      transport/internet/kcp/connection.go

4
transport/internet/kcp/connection.go

@ -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
}

Loading…
Cancel
Save