mirror of
https://github.com/fluencelabs/redis
synced 2025-04-25 10:32:14 +00:00
Fixed missing c->bufpos reset in luaRedisGenericCommand().
Bug introduced when adding a fast path to avoid copying the reply buffer for small replies that fit into the client static buffer.
This commit is contained in:
parent
c49955fd77
commit
3318b74705
@ -312,6 +312,7 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
|
|||||||
* the client buffer directly. */
|
* the client buffer directly. */
|
||||||
c->buf[c->bufpos] = '\0';
|
c->buf[c->bufpos] = '\0';
|
||||||
reply = c->buf;
|
reply = c->buf;
|
||||||
|
c->bufpos = 0;
|
||||||
} else {
|
} else {
|
||||||
reply = sdsnewlen(c->buf,c->bufpos);
|
reply = sdsnewlen(c->buf,c->bufpos);
|
||||||
c->bufpos = 0;
|
c->bufpos = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user