=act #3672 fix garbling of big outgoing Tcp.Write caused by mixup of buffers

This commit is contained in:
Johannes Rudolph 2013-10-17 14:10:00 +02:00
parent f194860dfb
commit f87f166aac
2 changed files with 26 additions and 3 deletions

View file

@ -348,9 +348,9 @@ private[io] abstract class TcpConnection(val tcp: TcpExt, val channel: SocketCha
} else if (data.nonEmpty) {
buffer.clear()
val copied = remainingData.copyToBuffer(buffer)
val copied = data.copyToBuffer(buffer)
buffer.flip()
writeToChannel(remainingData drop copied)
writeToChannel(data drop copied)
} else {
if (!ack.isInstanceOf[NoAck]) commander ! ack