From aa8496c7cdfaadc6d1759e09f43a8d374db6c311 Mon Sep 17 00:00:00 2001 From: Thales Macedo Garitezi Date: Fri, 16 Aug 2024 15:51:16 -0300 Subject: [PATCH] fix: maintain state when scale down ends --- src/framework/emqttb_group.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/framework/emqttb_group.erl b/src/framework/emqttb_group.erl index bcb21b2..ddea4ad 100644 --- a/src/framework/emqttb_group.erl +++ b/src/framework/emqttb_group.erl @@ -331,7 +331,7 @@ scale_down(0, S) -> scale_down(NRepeats, S = #s{id = Group}) -> case ets:first(live_id_pool(Group)) of '$end_of_table' -> - ok; + S; Id -> case ets:lookup(live_id_pool(Group), Id) of [] ->