Skip to content

Commit 0183885

Browse files
Merge pull request #14272 from rabbitmq/rabbitmq-server-14151
#14151 by @tomyouyou
2 parents 8c8a2e9 + 1afbdca commit 0183885

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
@@ -205,6 +205,11 @@ init_it(Recover, From, State = #q{q = Q0}) ->
205205
State#q{backing_queue = BQ, backing_queue_state = BQS}}}
206206
end.
207207

208+
stop_for_init(none, {Operation, Reason, _Reply, State}) ->
209+
{Operation, Reason, State};
210+
stop_for_init(_From, Result) ->
211+
Result.
212+
208213
init_it2(Recover, From, State = #q{q = Q,
209214
backing_queue = undefined,
210215
backing_queue_state = undefined}) ->
@@ -229,16 +234,16 @@ init_it2(Recover, From, State = #q{q = Q,
229234
fun() -> emit_stats(State1) end),
230235
noreply(State1);
231236
false ->
232-
{stop, normal, {existing, Q1}, State}
237+
stop_for_init(From, {stop, normal, {existing, Q1}, State})
233238
end;
234239
{error, timeout} ->
235240
Reason = {protocol_error, internal_error,
236241
"Could not declare ~ts on node '~ts' because the "
237242
"metadata store operation timed out",
238243
[rabbit_misc:rs(amqqueue:get_name(Q)), node()]},
239-
{stop, normal, Reason, State};
244+
stop_for_init(From, {stop, normal, Reason, State});
240245
Err ->
241-
{stop, normal, Err, State}
246+
stop_for_init(From, {stop, normal, Err, State})
242247
end.
243248

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

0 commit comments

Comments
 (0)