fix header to out

This commit is contained in:
Frédéric Brégier 2012-07-18 11:50:28 +03:00
parent 56a72c6456
commit e36c4c77bf

View File

@ -166,7 +166,7 @@ public class WebSocket08FrameEncoder extends MessageToByteEncoder<WebSocketFrame
if (maskPayload) {
int random = (int) (Math.random() * Integer.MAX_VALUE);
mask = ByteBuffer.allocate(4).putInt(random).array();
header.writeBytes(mask);
out.writeBytes(mask);
int counter = 0;
for (int i = data.readerIndex(); i < data.writerIndex(); i ++) {