@@ -205,6 +205,11 @@ init_it(Recover, From, State = #q{q = Q0}) ->
205
205
State # q {backing_queue = BQ , backing_queue_state = BQS }}}
206
206
end .
207
207
208
+ stop_for_init (none , {Operation , Reason , _Reply , State }) ->
209
+ {Operation , Reason , State };
210
+ stop_for_init (_From , Result ) ->
211
+ Result .
212
+
208
213
init_it2 (Recover , From , State = # q {q = Q ,
209
214
backing_queue = undefined ,
210
215
backing_queue_state = undefined }) ->
@@ -229,16 +234,16 @@ init_it2(Recover, From, State = #q{q = Q,
229
234
fun () -> emit_stats (State1 ) end ),
230
235
noreply (State1 );
231
236
false ->
232
- {stop , normal , {existing , Q1 }, State }
237
+ stop_for_init ( From , {stop , normal , {existing , Q1 }, State })
233
238
end ;
234
239
{error , timeout } ->
235
240
Reason = {protocol_error , internal_error ,
236
241
" Could not declare ~ts on node '~ts ' because the "
237
242
" metadata store operation timed out" ,
238
243
[rabbit_misc :rs (amqqueue :get_name (Q )), node ()]},
239
- {stop , normal , Reason , State };
244
+ stop_for_init ( From , {stop , normal , Reason , State }) ;
240
245
Err ->
241
- {stop , normal , Err , State }
246
+ stop_for_init ( From , {stop , normal , Err , State })
242
247
end .
243
248
244
249
recovery_status (new ) -> {no_barrier , new };
0 commit comments