@@ -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+
205210init_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
241246recovery_status (new ) -> {no_barrier , new };
0 commit comments