example: memcache: fix set command
Motivation: The example MemcacheClient set command doesn't work. Modifications: Fill the extras field buffer with zeros so that it gets written to the request payload. Result: The example MemcacheClient set command works.
This commit is contained in:
parent
c797e7bdc5
commit
4e09c305ab
@ -54,6 +54,7 @@ public class MemcacheClientHandler extends ChannelHandlerAdapter {
|
||||
|
||||
ByteBuf content = Unpooled.wrappedBuffer(value.getBytes(CharsetUtil.UTF_8));
|
||||
ByteBuf extras = ctx.alloc().buffer(8);
|
||||
extras.writeZero(8);
|
||||
|
||||
BinaryMemcacheRequest req = new DefaultFullBinaryMemcacheRequest(key, extras, content);
|
||||
req.setOpcode(BinaryMemcacheOpcodes.SET);
|
||||
|
Loading…
Reference in New Issue
Block a user