From 05f15933868bf0a71f80f6065226ddf98e581aad Mon Sep 17 00:00:00 2001 From: JimMoen Date: Tue, 22 Feb 2022 14:36:14 +0800 Subject: [PATCH] fix(gateway): enrich stomp conninfo before run hooks --- apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl b/apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl index 5d0daabb7..782a192b3 100644 --- a/apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl +++ b/apps/emqx_gateway/src/stomp/emqx_stomp_channel.erl @@ -133,7 +133,7 @@ init(ConnInfo = #{peername := {PeerHost, _}, Override = maps:merge(?DEFAULT_OVERRIDE, maps:get(clientinfo_override, Option, #{}) ), - #channel{ ctx = Ctx + #channel{ ctx = Ctx , conninfo = ConnInfo , clientinfo = ClientInfo , clientinfo_override = Override @@ -189,6 +189,8 @@ enrich_conninfo(_Packet, , clean_start => true , keepalive => 0 , expiry_interval => 0 + , conn_props => #{} + , receive_maximum => 0 }, {ok, Channel#channel{conninfo = NConnInfo}}.