From: antirez Date: Sun, 1 May 2011 01:27:40 +0000 (+0200) Subject: when creating not connected clients do not add them into the clients list, otherwise... X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/7b72272790268942b5f4f751c78ea6ed227b2bba when creating not connected clients do not add them into the clients list, otherwise they will be subject to timeouts and other stuff --- diff --git a/src/networking.c b/src/networking.c index 5f0d1b25..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; }