Skip to content

Commit 1cc8697

Browse files
committed
Minor fixes on ctx map protocol field
1 parent 38a2188 commit 1cc8697

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

deps/rabbit/src/rabbit_amqp_session.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ init({ReaderPid, WriterPid, ChannelNum, MaxFrameSize, User, Vhost, ContainerId,
476476
max_incoming_window = MaxIncomingWindow,
477477
max_link_credit = MaxLinkCredit,
478478
max_queue_credit = MaxQueueCredit,
479-
msg_interceptor_ctx = #{protocol => amqp,
479+
msg_interceptor_ctx = #{protocol => ?PROTOCOL,
480480
username => User#user.username,
481481
vhost => Vhost,
482482
conn_name => ConnName}

deps/rabbit/src/rabbit_message_interceptor.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
-export([intercept/3,
44
set_msg_annotation/4]).
55

6-
-type protocol() :: amqp091 | amqp | mqtt310 | mqtt311 | mqtt50.
6+
-type protocol() :: amqp091 | amqp10 | mqtt310 | mqtt311 | mqtt50.
77

88
-type msg_interceptor_ctx() :: #{protocol := protocol(),
99
vhost := binary(),

deps/rabbitmq_mqtt/src/rabbit_mqtt_processor.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2616,7 +2616,7 @@ build_msg_interceptor_ctx(#state{cfg = #cfg{client_id = ClientId,
26162616
proto_ver = ProtoVer
26172617
},
26182618
auth_state = #auth_state{user = #user{username = Username}}}) ->
2619-
#{protocol => proto_integer_to_atom(ProtoVer),
2619+
#{protocol => ProtoVer,
26202620
username => Username,
26212621
vhost => VHost,
26222622
conn_name => ConnName,

0 commit comments

Comments
 (0)