From 7b72272790268942b5f4f751c78ea6ed227b2bba Mon Sep 17 00:00:00 2001 From: antirez Date: Sun, 1 May 2011 03:27:40 +0200 Subject: [PATCH] when creating not connected clients do not add them into the clients list, otherwise they will be subject to timeouts and other stuff --- src/networking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }