From 9387d17dfeb757d685236ff5c792d102ea296631 Mon Sep 17 00:00:00 2001
From: antirez <antirez@gmail.com>
Date: Sun, 1 Nov 2009 11:05:50 +0100
Subject: [PATCH] append only file loading fixed

---
 redis.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/redis.c b/redis.c
index cebcdb2f..2d233311 100644
--- a/redis.c
+++ b/redis.c
@@ -5346,6 +5346,9 @@ static struct redisClient *createFakeClient(void) {
     c->argc = 0;
     c->argv = NULL;
     c->flags = 0;
+    /* We set the fake client as a slave waiting for the synchronization
+     * so that Redis will not try to send replies to this client. */
+    c->replstate = REDIS_REPL_WAIT_BGSAVE_START;
     c->reply = listCreate();
     listSetFreeMethod(c->reply,decrRefCount);
     listSetDupMethod(c->reply,dupClientReplyValue);