Skip to content

Commit

Permalink
use fixed size buffer for control messages
Browse files Browse the repository at this point in the history
  • Loading branch information
anfeng committed May 11, 2013
1 parent 2718142 commit 687cc25
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ static ControlMessage mkMessage(short encoded) {

/**
* encode the current Control Message into a channel buffer
* @param bout
* @throws Exception
*/
ChannelBuffer buffer() throws Exception {
ChannelBufferOutputStream bout = new ChannelBufferOutputStream(ChannelBuffers.dynamicBuffer());
ChannelBufferOutputStream bout = new ChannelBufferOutputStream(ChannelBuffers.buffer(2));
write(bout);
bout.close();
return bout.buffer();
Expand Down

0 comments on commit 687cc25

Please sign in to comment.