|
@@ -392,21 +392,21 @@ func (c *Connection) WriteMultiBuffer(mb buf.MultiBuffer) error {
|
|
|
}
|
|
}
|
|
|
}()
|
|
}()
|
|
|
|
|
|
|
|
|
|
+ mbPtr := &mb
|
|
|
|
|
+
|
|
|
for {
|
|
for {
|
|
|
for {
|
|
for {
|
|
|
if c == nil || c.State() != StateActive {
|
|
if c == nil || c.State() != StateActive {
|
|
|
return io.ErrClosedPipe
|
|
return io.ErrClosedPipe
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- mbPtr := &mb
|
|
|
|
|
-
|
|
|
|
|
if !c.sendingWorker.Push(func(bb []byte) (int, error) {
|
|
if !c.sendingWorker.Push(func(bb []byte) (int, error) {
|
|
|
return mbPtr.Read(bb[:c.mss])
|
|
return mbPtr.Read(bb[:c.mss])
|
|
|
}) {
|
|
}) {
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
updatePending = true
|
|
updatePending = true
|
|
|
- if mb.IsEmpty() {
|
|
|
|
|
|
|
+ if mbPtr.IsEmpty() {
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|