Skip to content

Commit 49130b3

Browse files
Merge pull request #14558 from rabbitmq/mergify/bp/v4.2.x/pr-14555
2 parents 2f2fbd3 + f5e8df7 commit 49130b3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

deps/rabbit/src/rabbit_priority_queue.erl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,15 @@ zip_msgs_and_acks(Pubs, AckTags) ->
665665
{Id, AckTag}
666666
end, Pubs, AckTags).
667667

668-
format_state(S = #passthrough{bq = BQ, bqs = BQS0}) ->
668+
format_state(State = #state{bq = BQ, bqss = BQSs0}) when is_list(BQSs0) ->
669669
case erlang:function_exported(BQ, format_state, 1) of
670670
true ->
671-
BQS1 = BQ:format_state(BQS0),
672-
S#passthrough{bqs = BQS1};
671+
BQSs1 = foreach1(fun (_Priority, BQSN) ->
672+
BQ:format_state(BQSN)
673+
end, State),
674+
State#state{bqss = BQSs1};
673675
_ ->
674-
S#passthrough{bqs = passthrough_bqs_truncated}
675-
end.
676+
State#state{bqss = bqss_truncated}
677+
end;
678+
format_state(State = #passthrough{bq = BQ, bqs = BQS}) ->
679+
?passthrough1(format_state(BQS)).

0 commit comments

Comments
 (0)