Skip to content

Commit 3c349b3

Browse files
Merge pull request #14276 from rabbitmq/mergify/bp/v4.1.x/pr-14272
#14151 by @tomyouyou (backport #14272)
2 parents be3aa5b + c23ded5 commit 3c349b3

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

deps/rabbit/src/rabbit_amqqueue_process.erl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ init_it(Recover, From, State = #q{q = Q0}) ->
202202
State#q{backing_queue = BQ, backing_queue_state = BQS}}}
203203
end.
204204

205+
stop_for_init(none, {Operation, Reason, _Reply, State}) ->
206+
{Operation, Reason, State};
207+
stop_for_init(_From, Result) ->
208+
Result.
209+
205210
init_it2(Recover, From, State = #q{q = Q,
206211
backing_queue = undefined,
207212
backing_queue_state = undefined}) ->
@@ -226,16 +231,16 @@ init_it2(Recover, From, State = #q{q = Q,
226231
fun() -> emit_stats(State1) end),
227232
noreply(State1);
228233
false ->
229-
{stop, normal, {existing, Q1}, State}
234+
stop_for_init(From, {stop, normal, {existing, Q1}, State})
230235
end;
231236
{error, timeout} ->
232237
Reason = {protocol_error, internal_error,
233238
"Could not declare ~ts on node '~ts' because the "
234239
"metadata store operation timed out",
235240
[rabbit_misc:rs(amqqueue:get_name(Q)), node()]},
236-
{stop, normal, Reason, State};
241+
stop_for_init(From, {stop, normal, Reason, State});
237242
Err ->
238-
{stop, normal, Err, State}
243+
stop_for_init(From, {stop, normal, Err, State})
239244
end.
240245

241246
recovery_status(new) -> {no_barrier, new};

0 commit comments

Comments
 (0)