Skip to content

Commit

Permalink
fix disconnectSlaves, to try to free each slave.
Browse files Browse the repository at this point in the history
the recent change in that loop (iteration rather than waiting for it to
be empty) was intended to avoid an endless loop in case some slave would
refuse to be freed.

but the lookup of the first client remained, which would have caused it
to try the first one again and again instead of moving on.
  • Loading branch information
oranagra authored and antirez committed Jun 9, 2020
1 parent 4846c0c commit 676445a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,6 @@ void disconnectSlaves(void) {
listNode *ln;
listRewind(server.slaves,&li);
while((ln = listNext(&li))) {
listNode *ln = listFirst(server.slaves);
freeClient((client*)ln->value);
}
}
Expand Down

0 comments on commit 676445a

Please sign in to comment.