From 8477780e2b6e5c1a3e7cbc32ffd57258119f0c84 Mon Sep 17 00:00:00 2001 From: JianBo He Date: Tue, 2 Mar 2021 14:37:35 +0800 Subject: [PATCH] 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 --- apps/emqx_management/src/emqx_mgmt.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/emqx_management/src/emqx_mgmt.erl b/apps/emqx_management/src/emqx_mgmt.erl index 39bc2153a..3ab1b80ee 100644 --- a/apps/emqx_management/src/emqx_mgmt.erl +++ b/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}], ['$_']}], 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) -> lists:append([lookup_subscriptions(Node, ClientId) || Node <- ekka_mnesia:running_nodes()]).