Skip to content

Commit 7881327

Browse files
Merge pull request #15752 from rabbitmq/mergify/bp/v4.2.x/pr-15751
Correct channel error logged when the per-user channel limit is exceeded (backport #15750) (backport #15751)
2 parents 0af55d8 + 3e42227 commit 7881327

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

deps/rabbit/src/rabbit_reader.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -966,11 +966,11 @@ create_channel(Channel,
966966
put({ch_pid, ChPid}, {Channel, MRef}),
967967
put({channel, Channel}, {ChPid, AState}),
968968
{ok, {ChPid, AState}, State#v1{channel_count = ChannelCount + 1}};
969-
{true, Limit, Fmt} ->
969+
{true, Limit, Fmt, FmtArg} ->
970970
{error, rabbit_misc:amqp_error(
971971
not_allowed,
972972
Fmt,
973-
[node(), Limit], 'none')}
973+
[FmtArg, Limit], 'none')}
974974
end.
975975

976976
is_over_limits(Username) ->
@@ -983,13 +983,13 @@ is_over_limits(Username) ->
983983
Fmt =
984984
"number of channels opened on node '~ts' has reached "
985985
"the maximum allowed limit of (~w)",
986-
{true, Limit, Fmt}
986+
{true, Limit, Fmt, node()}
987987
end;
988988
{true, Limit} ->
989989
Fmt =
990990
"number of channels opened for user '~ts' has reached "
991991
"the maximum allowed user limit of (~w)",
992-
{true, Limit, Fmt}
992+
{true, Limit, Fmt, Username}
993993
end.
994994

995995
is_over_node_channel_limit() ->

0 commit comments

Comments
 (0)