Merge pull request #7097 from JimMoen/fix-stomp-conninfo

fix(gateway): enrich stomp conninfo before run hooks
This commit is contained in:
JimMoen 2022-02-22 18:26:03 +08:00 committed by GitHub
commit d735fecfba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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}}.