Commit b804afcf authored by antirez's avatar antirez
Browse files

Use a safe dict.c iterator in clusterCron().

parent 35a977c4
...@@ -1585,7 +1585,7 @@ void clusterCron(void) { ...@@ -1585,7 +1585,7 @@ void clusterCron(void) {
clusterNode *min_pong_node = NULL; clusterNode *min_pong_node = NULL;
/* Check if we have disconnected nodes and re-establish the connection. */ /* Check if we have disconnected nodes and re-establish the connection. */
di = dictGetIterator(server.cluster->nodes); di = dictGetSafeIterator(server.cluster->nodes);
while((de = dictNext(di)) != NULL) { while((de = dictNext(di)) != NULL) {
clusterNode *node = dictGetVal(de); clusterNode *node = dictGetVal(de);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment