diff options
author | Oran Agra <oran@redislabs.com> | 2020-06-08 09:50:06 +0300 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2020-06-09 11:53:01 +0200 |
commit | 676445ad953724221d11d4de1d1ea1ed955cd474 (patch) | |
tree | 3d810c72848f7feea41349d6a05f5ab0d2324a1d | |
parent | 4846c0c8af3226c7a2d575ff93391b9cf0590655 (diff) | |
download | redis-676445ad953724221d11d4de1d1ea1ed955cd474.tar.gz |
fix disconnectSlaves, to try to free each slave.
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.
-rw-r--r-- | src/networking.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/networking.c b/src/networking.c index cc28732d1..80973109c 100644 --- a/src/networking.c +++ b/src/networking.c @@ -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); } } |