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

This commit is contained in:
antirez 2013-08-21 15:51:10 +02:00
parent 35a977c499
commit b804afcf01

View File

@ -1585,7 +1585,7 @@ void clusterCron(void) {
clusterNode *min_pong_node = NULL;
/* 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) {
clusterNode *node = dictGetVal(de);