Browse Source

Merge branch 'emqx30-dev' of github.com:emqtt/emqttd into emqx30-dev

Feng Lee 7 years atrás
parent
commit
36129073e8
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/emqx_shared_sub.erl

+ 1 - 2
src/emqx_shared_sub.erl

@@ -81,7 +81,7 @@ record(Group, Topic, SubPid) ->
     #emqx_shared_subscription{group = Group, topic = Topic, subpid = SubPid}.
 
 %% TODO: dispatch strategy, ensure the delivery...
-dispatch(Group, Topic, Delivery = #delivery{message = Msg, flows = Flows}) ->
+dispatch({Group, _Node}, Topic, Delivery = #delivery{message = Msg, flows = Flows}) ->
     case pick(subscribers(Group, Topic)) of
         false  -> Delivery;
         SubPid -> SubPid ! {dispatch, Topic, Msg},
@@ -98,7 +98,6 @@ pick(SubPids) ->
 
 subscribers(Group, Topic) ->
     ets:select(?TAB, [{{emqx_shared_subscription, Group, Topic, '$1'}, [], ['$1']}]).
-
 %%-----------------------------------------------------------------------------
 %% gen_server callbacks
 %%-----------------------------------------------------------------------------