Fixing clearToFill bug

This commit is contained in:
Joakim Erdfelt 2012-07-06 09:45:24 -07:00
parent 03443cd237
commit 2fca248352

View File

@ -283,7 +283,7 @@ public class WebSocketAsyncConnection extends AbstractAsyncConnection implements
TextFrame frame = new TextFrame(messages[i]);
frame.setFin(true);
raw[i] = bufferPool.acquire(policy.getBufferSize(),false);
BufferUtil.clear(raw[i]);
BufferUtil.clearToFill(raw[i]);
generator.generate(raw[i],frame);
BufferUtil.flipToFlush(raw[i],0);
}