Skip to content

Commit

Permalink
Merge pull request #3163 from rabbitmq/mk-epmd-starter-loop-timeout
Browse files Browse the repository at this point in the history
Make sure not to wait for epmd-starter subprocess forever

(cherry picked from commit a52a424)
  • Loading branch information
michaelklishin committed Jun 30, 2021
1 parent 39902cc commit 0d5069c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion deps/rabbit_common/src/rabbit_nodes_common.erl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,17 @@ ensure_epmd() ->
port_shutdown_loop(Port) ->
receive
{Port, {exit_status, _Rc}} -> ok;
{Port, _} -> port_shutdown_loop(Port)
{Port, closed} -> ok;
{Port, {data, _}} -> port_shutdown_loop(Port);
{'EXIT', Port, Reason} ->
rabbit_log:error("Failed to start a one-off Erlang VM to keep epmd alive: ~p", [Reason])
after 15000 ->
%% ensure the port is closed
Port ! {self(), close},
receive
{Port, closed } -> ok
after 5000 -> ok
end
end.

cookie_hash() ->
Expand Down

0 comments on commit 0d5069c

Please sign in to comment.