diff options
author | Tim Watson <tim@rabbitmq.com> | 2013-04-05 11:19:07 +0100 |
---|---|---|
committer | Tim Watson <tim@rabbitmq.com> | 2013-04-05 11:19:07 +0100 |
commit | 0a395ff7ede19d4557d65ce167df2b0509e626f3 (patch) | |
tree | 9f9ecf368d750112c8f1e42a750be969f195a9ef | |
parent | 85c13eb713440de1d8b24ef1c5be9cceb0e1d8f5 (diff) | |
parent | 2d420464faa7c904a800c5dc9bd540e188988acc (diff) | |
download | rabbitmq-server-0a395ff7ede19d4557d65ce167df2b0509e626f3.tar.gz |
merge default into bug25487
-rw-r--r-- | src/rabbit_client_sup.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rabbit_client_sup.erl b/src/rabbit_client_sup.erl index 9602c512..1a15b0cb 100644 --- a/src/rabbit_client_sup.erl +++ b/src/rabbit_client_sup.erl @@ -18,7 +18,7 @@ -behaviour(supervisor2). --export([start_link/1, start_link/2]). +-export([start_link/1, start_link/2, start_link/3]). -export([init/1]). @@ -43,6 +43,12 @@ start_link(Callback) -> start_link(SupName, Callback) -> supervisor2:start_link(SupName, ?MODULE, Callback). +start_link(SupName, Callback, worker) -> + supervisor2:start_link(SupName, ?MODULE, {Callback, worker}). + init({M,F,A}) -> {ok, {{simple_one_for_one_terminate, 0, 1}, - [{client, {M,F,A}, temporary, infinity, supervisor, [M]}]}}. + [{client, {M,F,A}, temporary, infinity, supervisor, [M]}]}}; +init({{M,F,A}, worker}) -> + {ok, {{simple_one_for_one_terminate, 0, 1}, + [{client, {M,F,A}, temporary, ?MAX_WAIT, worker, [M]}]}}. |