/* Case 2: we lost the connection with the master. */
if (c->flags & REDIS_MASTER) {
server.master = NULL;
- server.replstate = REDIS_REPL_CONNECT;
+ server.repl_state = REDIS_REPL_CONNECT;
server.repl_down_since = time(NULL);
/* Since we lost the connection with the master, we should also
* close the connection with all our slaves if we have any, so
listRewind(server.clients,&li);
while ((ln = listNext(&li)) != NULL) {
+ sds cs;
+
client = listNodeValue(ln);
- o = sdscatsds(o,getClientInfoString(client));
+ cs = getClientInfoString(client);
+ o = sdscatsds(o,cs);
+ sdsfree(cs);
o = sdscatlen(o,"\n",1);
}
return o;