Skip to content

Commit

Permalink
Use a safe dict.c iterator in clusterCron().
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Aug 21, 2013
1 parent 35a977c commit b804afc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b804afc

Please sign in to comment.