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