Skip to content

Commit dde8e69

Browse files
committed
Report frame_max as integer
Resolves #11838
1 parent 963c5d6 commit dde8e69

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

deps/rabbit/src/rabbit_amqp_reader.erl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
-module(rabbit_amqp_reader).
99

1010
-include_lib("rabbit_common/include/rabbit.hrl").
11+
-include_lib("amqp10_common/include/amqp10_types.hrl").
1112
-include("rabbit_amqp.hrl").
1213

1314
-export([init/2,
@@ -968,7 +969,11 @@ i(auth_mechanism, #v1{connection = #v1_connection{auth_mechanism = Val}}) ->
968969
_ -> Val
969970
end;
970971
i(frame_max, #v1{connection = #v1_connection{outgoing_max_frame_size = Val}}) ->
971-
Val;
972+
%% Some HTTP API clients expect an integer to be reported.
973+
%% https://github.com/rabbitmq/rabbitmq-server/issues/11838
974+
if Val =:= unlimited -> ?UINT_MAX;
975+
is_integer(Val) -> Val
976+
end;
972977
i(timeout, #v1{connection = #v1_connection{timeout = Millis}}) ->
973978
Millis div 1000;
974979
i(user,

0 commit comments

Comments
 (0)