浏览代码

fix(mgmt): remove the useless match

Currently, the `{topic, Topic}` pattern is not used for management.
Moreover it will casue a `function_caluse` while the previous caluse not
matched
JianBo He 5 年之前
父节点
当前提交
8477780e2b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      apps/emqx_management/src/emqx_mgmt.erl

+ 2 - 2
apps/emqx_management/src/emqx_mgmt.erl

@@ -303,8 +303,8 @@ list_subscriptions_via_topic(Node, Topic, {M,F}) when Node =:= node() ->
     MatchSpec = [{{{'_', '$1'}, '_'}, [{'=:=','$1', Topic}], ['$_']}],
     MatchSpec = [{{{'_', '$1'}, '_'}, [{'=:=','$1', Topic}], ['$_']}],
     M:F(ets:select(emqx_suboption, MatchSpec));
     M:F(ets:select(emqx_suboption, MatchSpec));
 
 
-list_subscriptions_via_topic(Node, {topic, Topic}, FormatFun) ->
-    rpc_call(Node, list_subscriptions_via_topic, [Node, {topic, Topic}, FormatFun]).
+list_subscriptions_via_topic(Node, Topic, FormatFun) ->
+    rpc_call(Node, list_subscriptions_via_topic, [Node, Topic, FormatFun]).
 
 
 lookup_subscriptions(ClientId) ->
 lookup_subscriptions(ClientId) ->
     lists:append([lookup_subscriptions(Node, ClientId) || Node <- ekka_mnesia:running_nodes()]).
     lists:append([lookup_subscriptions(Node, ClientId) || Node <- ekka_mnesia:running_nodes()]).