X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/0f1d64ca577c8594e26b9e1663e49c8e1bc13757..da386cdf337a79b6734b58d3c5e426741e49c043:/src/networking.c?ds=sidebyside diff --git a/src/networking.c b/src/networking.c index b26c2059..976b472a 100644 --- a/src/networking.c +++ b/src/networking.c @@ -57,7 +57,7 @@ redisClient *createClient(int fd) { c->pubsub_patterns = listCreate(); listSetFreeMethod(c->pubsub_patterns,decrRefCount); listSetMatchMethod(c->pubsub_patterns,listMatchObjects); - listAddNodeTail(server.clients,c); + if (fd != -1) listAddNodeTail(server.clients,c); initClientMultiState(c); return c; } @@ -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 ||