=act #15572 don't read recursively in pullMode when a complete buffer was read

This commit is contained in:
Johannes Rudolph 2014-07-22 16:17:45 +02:00
parent cb05725c1e
commit 1e0b61a160
2 changed files with 39 additions and 10 deletions

View file

@ -213,7 +213,7 @@ private[io] abstract class TcpConnection(val tcp: TcpExt, val channel: SocketCha
if (readBytes > 0) info.handler ! Received(ByteString(buffer))
readBytes match {
case `maxBufferSpace` innerRead(buffer, remainingLimit - maxBufferSpace)
case `maxBufferSpace` if (pullMode) MoreDataWaiting else innerRead(buffer, remainingLimit - maxBufferSpace)
case x if x >= 0 AllRead
case -1 EndOfStream
case _