File tree Expand file tree Collapse file tree 1 file changed +19
-13
lines changed
Expand file tree Collapse file tree 1 file changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -347,19 +347,25 @@ handle_app_error(App, Reason) ->
347347
348348start_it (StartFun ) ->
349349 Marker = spawn_link (fun () -> receive stop -> ok end end ),
350- register (rabbit_boot , Marker ),
351- try
352- StartFun ()
353- catch
354- throw :{could_not_start , _App , _Reason }= Err ->
355- boot_error (Err , not_available );
356- _ :Reason ->
357- boot_error (Reason , erlang :get_stacktrace ())
358- after
359- unlink (Marker ),
360- Marker ! stop ,
361- % % give the error loggers some time to catch up
362- timer :sleep (100 )
350+ case catch register (rabbit_boot , Marker ) of
351+ true -> try
352+ case is_running () of
353+ true -> ok ;
354+ false -> StartFun ()
355+ end
356+ catch
357+ throw :{could_not_start , _App , _Reason }= Err ->
358+ boot_error (Err , not_available );
359+ _ :Reason ->
360+ boot_error (Reason , erlang :get_stacktrace ())
361+ after
362+ unlink (Marker ),
363+ Marker ! stop ,
364+ % % give the error loggers some time to catch up
365+ timer :sleep (100 )
366+ end ;
367+ _ -> unlink (Marker ),
368+ Marker ! stop
363369 end .
364370
365371stop () ->
You can’t perform that action at this time.
0 commit comments