Skip to content

Commit

Permalink
Read bytes when ready
Browse files Browse the repository at this point in the history
  • Loading branch information
rchodava committed Apr 9, 2016
1 parent 86369b9 commit 27f6aa9
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public void channelReadComplete(ChannelHandlerContext context) {
context.flush();
}

@Override
public void channelActive(ChannelHandlerContext context) throws Exception {
context.read();
}

@Override
public void channelRead(ChannelHandlerContext context, Object message) {
if (message instanceof HttpRequest) {
Expand Down Expand Up @@ -88,6 +93,8 @@ public void channelRead(ChannelHandlerContext context, Object message) {
entityStream.onCompleted();
}
}

context.read();
}

private void processRequest(ChannelHandlerContext context, HttpRequest originalRequest) {
Expand Down

0 comments on commit 27f6aa9

Please sign in to comment.