Skip to content

Commit

Permalink
Merge pull request netty#460 from fredericBregier/master
Browse files Browse the repository at this point in the history
Master fix for issue netty#456 related to payload in WebSocket08FrameEncoder
  • Loading branch information
normanmaurer committed Jul 18, 2012
2 parents 3447e87 + 56a72c6 commit b5412c9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public void encode(ChannelHandlerContext ctx,
if (maskPayload) {
int random = (int) (Math.random() * Integer.MAX_VALUE);
mask = ByteBuffer.allocate(4).putInt(random).array();
out.writeInt((int) (Math.random() * Integer.MAX_VALUE));
header.writeBytes(mask);

int counter = 0;
for (int i = data.readerIndex(); i < data.writerIndex(); i ++) {
Expand Down

0 comments on commit b5412c9

Please sign in to comment.