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 | 7a0476196235cee922b24d9bd7ad62c21b2ae110 (patch) | |
| tree | 9f9ecf368d750112c8f1e42a750be969f195a9ef | |
| parent | 7339260059b0efca30fbf7f5335c6418077c60f8 (diff) | |
| parent | 541d6950bb76846bcd2f759a2461b0cc29d92bae (diff) | |
| download | rabbitmq-server-git-7a0476196235cee922b24d9bd7ad62c21b2ae110.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 9602c51248..1a15b0cbe0 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]}]}}. |
