Correctly glue the reply buffer. For now returned as it is to Lua, but will be converted into Lua native type later.

This commit is contained in:
antirez
2011-05-01 03:12:53 +02:00
parent 0f1d64ca57
commit 7156f43c04
3 changed files with 9 additions and 3 deletions

View File

@ -65,6 +65,7 @@ redisClient *createClient(int fd) {
/* Set the event loop to listen for write events on the client's socket.
* Typically gets called every time a reply is built. */
int _installWriteEvent(redisClient *c) {
if (c->flags & REDIS_LUA_CLIENT) return REDIS_OK;
if (c->fd <= 0) return REDIS_ERR;
if (c->bufpos == 0 && listLength(c->reply) == 0 &&
(c->replstate == REDIS_REPL_NONE ||