Browse Source

fix(share sub): fix the issue that the number of subscriptions dropped to 0 during the picking subscriber and caused a crash

zhouzb 5 years ago
parent
commit
fbf8d3e111
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/emqx_shared_sub.erl

+ 1 - 1
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;
         [] ->