diff --git a/apps/emqx_gateway/src/coap/emqx_coap_channel.erl b/apps/emqx_gateway/src/coap/emqx_coap_channel.erl index 1edc28494..207524448 100644 --- a/apps/emqx_gateway/src/coap/emqx_coap_channel.erl +++ b/apps/emqx_gateway/src/coap/emqx_coap_channel.erl @@ -579,7 +579,7 @@ ensure_connected( } ) -> NConnInfo = ConnInfo#{connected_at => erlang:system_time(millisecond)}, - _ = run_hooks(Ctx, 'client.connack', [NConnInfo, connection_accepted, []]), + _ = run_hooks(Ctx, 'client.connack', [NConnInfo, connection_accepted, #{}]), ok = run_hooks(Ctx, 'client.connected', [ClientInfo, NConnInfo]), Channel#channel{conninfo = NConnInfo, conn_state = connected}. diff --git a/apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl b/apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl index 4ef48d264..6e6a67d0b 100644 --- a/apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl +++ b/apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl @@ -417,10 +417,10 @@ handle_in(Packet = ?PACKET(?CMD_CONNECT), Channel) -> emqx_misc:pipeline( [ fun enrich_conninfo/2, - fun run_conn_hooks/2, fun negotiate_version/2, fun enrich_clientinfo/2, fun assign_clientid_to_conninfo/2, + fun run_conn_hooks/2, fun set_log_meta/2, %% TODO: How to implement the banned in the gateway instance? %, fun check_banned/2 @@ -755,7 +755,7 @@ handle_out( } ) -> %% XXX: connection_accepted is not defined by stomp protocol - _ = run_hooks(Ctx, 'client.connack', [ConnInfo, connection_accepted, []]), + _ = run_hooks(Ctx, 'client.connack', [ConnInfo, connection_accepted, #{}]), Replies = [ {outgoing, connected_frame(Headers)}, {event, connected}