From 676445ad953724221d11d4de1d1ea1ed955cd474 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Mon, 8 Jun 2020 09:50:06 +0300 Subject: [PATCH] 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. --- src/networking.c | 1 - 1 file changed, 1 deletion(-) 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); } }