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
46576fd2ff
commit
54a39a94ac
@ -54,6 +54,7 @@ public class MemcacheClientHandler extends ChannelDuplexHandler {
|
||||
|
||||
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