diff --git a/Makefile b/Makefile index b9fb416e4..99b029f87 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ export EMQX_DEFAULT_BUILDER = ghcr.io/emqx/emqx-builder/5.0-5:1.13.2-24.1.5-4-al export EMQX_DEFAULT_RUNNER = alpine:3.14 export OTP_VSN ?= $(shell $(CURDIR)/scripts/get-otp-vsn.sh) export ELIXIR_VSN ?= $(shell $(CURDIR)/scripts/get-elixir-vsn.sh) -export EMQX_DASHBOARD_VERSION ?= v0.19.0 +export EMQX_DASHBOARD_VERSION ?= v0.20.0 export DOCKERFILE := deploy/docker/Dockerfile export DOCKERFILE_TESTING := deploy/docker/Dockerfile.testing ifeq ($(OS),Windows_NT) diff --git a/apps/emqx_auto_subscribe/src/emqx_auto_subscribe.erl b/apps/emqx_auto_subscribe/src/emqx_auto_subscribe.erl index 134248920..03bacca68 100644 --- a/apps/emqx_auto_subscribe/src/emqx_auto_subscribe.erl +++ b/apps/emqx_auto_subscribe/src/emqx_auto_subscribe.erl @@ -60,8 +60,12 @@ test(_) -> %% hook on_client_connected(ClientInfo, ConnInfo, {TopicHandler, Options}) -> - TopicTables = erlang:apply(TopicHandler, handle, [ClientInfo, ConnInfo, Options]), - self() ! {subscribe, TopicTables}; + case erlang:apply(TopicHandler, handle, [ClientInfo, ConnInfo, Options]) of + [] -> ok; + TopicTables -> + _ = self() ! {subscribe, TopicTables}, + ok + end; on_client_connected(_, _, _) -> ok. diff --git a/apps/emqx_gateway/src/exproto/emqx_exproto_channel.erl b/apps/emqx_gateway/src/exproto/emqx_exproto_channel.erl index 64d4cb962..137682ff8 100644 --- a/apps/emqx_gateway/src/exproto/emqx_exproto_channel.erl +++ b/apps/emqx_gateway/src/exproto/emqx_exproto_channel.erl @@ -423,6 +423,9 @@ handle_info({hreply, FunName, ok}, Channel) handle_info({hreply, FunName, {error, Reason}}, Channel) -> {shutdown, {error, {FunName, Reason}}, Channel}; +handle_info({subscribe, _}, Channel) -> + {ok, Channel}; + handle_info(Info, Channel) -> ?SLOG(warning, #{ msg => "unexpected_info" , info => Info diff --git a/apps/emqx_gateway/src/mqttsn/emqx_sn_channel.erl b/apps/emqx_gateway/src/mqttsn/emqx_sn_channel.erl index 4a0a49b91..26fa701da 100644 --- a/apps/emqx_gateway/src/mqttsn/emqx_sn_channel.erl +++ b/apps/emqx_gateway/src/mqttsn/emqx_sn_channel.erl @@ -1296,6 +1296,9 @@ handle_info(clean_authz_cache, Channel) -> ok = emqx_authz_cache:empty_authz_cache(), {ok, Channel}; +handle_info({subscribe, _}, Channel) -> + {ok, Channel}; + handle_info(Info, Channel) -> ?SLOG(error, #{ msg => "unexpected_info" , info => Info diff --git a/apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl b/apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl index 5d0daabb7..a2ffb9662 100644 --- a/apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl +++ b/apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl @@ -777,6 +777,9 @@ handle_info(clean_authz_cache, Channel) -> ok = emqx_authz_cache:empty_authz_cache(), {ok, Channel}; +handle_info({subscribe, _}, Channel) -> + {ok, Channel}; + handle_info(Info, Channel) -> ?SLOG(error, #{ msg => "unexpected_info" , info => Info diff --git a/apps/emqx_modules/src/emqx_event_message_api.erl b/apps/emqx_modules/src/emqx_event_message_api.erl index 65c33c0d7..e25edff97 100644 --- a/apps/emqx_modules/src/emqx_event_message_api.erl +++ b/apps/emqx_modules/src/emqx_event_message_api.erl @@ -15,10 +15,11 @@ %%-------------------------------------------------------------------- -module(emqx_event_message_api). +-include("emqx_modules.hrl"). + -behaviour(minirest_api). -import(hoconsc, [mk/2, ref/2]). --include("emqx_modules.hrl"). -export([ api_spec/0 , paths/0