Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b804afcf
Commit
b804afcf
authored
Aug 21, 2013
by
antirez
Browse files
Use a safe dict.c iterator in clusterCron().
parent
35a977c4
Changes
1
Show whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
b804afcf
...
@@ -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
=
dictGet
Safe
Iterator
(
server
.
cluster
->
nodes
);
while
((
de
=
dictNext
(
di
))
!=
NULL
)
{
while
((
de
=
dictNext
(
di
))
!=
NULL
)
{
clusterNode
*
node
=
dictGetVal
(
de
);
clusterNode
*
node
=
dictGetVal
(
de
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment