Blame rabbitmq-common-0002-Use-proto_dist-from-config-instead-of-always-using-d.patch

5b2912
From: Peter Lemenkov <lemenkov@redhat.com>
5b2912
Date: Fri, 15 Jul 2016 16:01:08 +0200
5b2912
Subject: [PATCH] Use proto_dist from config instead of always using default
5b2912
 (inet_tcp)
5b2912
5b2912
Signed-off-by: Peter Lemenkov <lemenkov@redhat.com>
5b2912
5b2912
diff --git a/src/rabbit_nodes.erl b/src/rabbit_nodes.erl
5b2912
index 70a5355..6bfce23 100644
5b2912
--- a/src/rabbit_nodes.erl
5b2912
+++ b/src/rabbit_nodes.erl
5b2912
@@ -221,9 +221,11 @@ set_cluster_name(Name) ->
5b2912
 ensure_epmd() ->
5b2912
     {ok, Prog} = init:get_argument(progname),
5b2912
     ID = rabbit_misc:random(1000000000),
5b2912
+    ProtoDist = application:get_env(kernel, proto_dist, inet_tcp),
5b2912
     Port = open_port(
5b2912
              {spawn_executable, os:find_executable(Prog)},
5b2912
              [{args, ["-sname", rabbit_misc:format("epmd-starter-~b", [ID]),
5b2912
+                      "-proto_dist", rabbit_misc:format("~p", [ProtoDist]),
5b2912
                       "-noshell", "-eval", "halt()."]},
5b2912
               exit_status, stderr_to_stdout, use_stdio]),
5b2912
     port_shutdown_loop(Port).