Преглед изворни кода

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

zhouzb пре 5 година
родитељ
комит
fbf8d3e111
1 измењених фајлова са 1 додато и 1 уклоњено
  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) ->
 do_pick(Strategy, ClientId, Group, Topic, FailedSubs) ->
     All = subscribers(Group, Topic),
     All = subscribers(Group, Topic),
     case All -- FailedSubs of
     case All -- FailedSubs of
-        [] when FailedSubs =:= [] ->
+        [] when All =:= [] ->
             %% Genuinely no subscriber
             %% Genuinely no subscriber
             false;
             false;
         [] ->
         [] ->