From fbf8d3e111ae658ae55c16620a180c36cbc8f1b1 Mon Sep 17 00:00:00 2001 From: zhouzb Date: Wed, 30 Dec 2020 10:27:21 +0800 Subject: [PATCH] fix(share sub): fix the issue that the number of subscriptions dropped to 0 during the picking subscriber and caused a crash --- src/emqx_shared_sub.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emqx_shared_sub.erl b/src/emqx_shared_sub.erl index 71372cd90..17476199b 100644 --- a/src/emqx_shared_sub.erl +++ b/src/emqx_shared_sub.erl @@ -246,7 +246,7 @@ pick(Strategy, ClientId, Group, Topic, FailedSubs) -> do_pick(Strategy, ClientId, Group, Topic, FailedSubs) -> All = subscribers(Group, Topic), case All -- FailedSubs of - [] when FailedSubs =:= [] -> + [] when All =:= [] -> %% Genuinely no subscriber false; [] ->