diff options
| author | Matthew Sackman <matthew@lshift.net> | 2010-03-08 15:12:24 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2010-03-08 15:12:24 +0000 |
| commit | 2908a1ea8281ffbb426ffde3366fd93381288349 (patch) | |
| tree | 5e7dde5fef746505265381bc06a4b8c3c52034af /src | |
| parent | 43acb2b32a8952fbb731e3698a99c26876f278ce (diff) | |
| download | rabbitmq-server-git-2908a1ea8281ffbb426ffde3366fd93381288349.tar.gz | |
Extended all timeouts
Diffstat (limited to 'src')
| -rw-r--r-- | src/pg_local.erl | 2 | ||||
| -rw-r--r-- | src/rabbit.erl | 15 | ||||
| -rw-r--r-- | src/rabbit_restartable_sup.erl | 7 | ||||
| -rw-r--r-- | src/rabbit_sup.erl | 7 | ||||
| -rw-r--r-- | src/tcp_listener_sup.erl | 4 |
5 files changed, 20 insertions, 15 deletions
diff --git a/src/pg_local.erl b/src/pg_local.erl index fa41fe46b3..1501331d6b 100644 --- a/src/pg_local.erl +++ b/src/pg_local.erl @@ -206,7 +206,7 @@ ensure_started() -> case whereis(?MODULE) of undefined -> C = {pg_local, {?MODULE, start_link, []}, permanent, - 1000, worker, [?MODULE]}, + 16#ffffffff, worker, [?MODULE]}, supervisor:start_child(kernel_safe_sup, C); PgLocalPid -> {ok, PgLocalPid} diff --git a/src/rabbit.erl b/src/rabbit.erl index 94d852f921..326893ca22 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -197,15 +197,12 @@ stop() -> ok = rabbit_misc:stop_applications(?APPS). stop_and_halt() -> - spawn(fun () -> - SleepTime = 1000, - rabbit_log:info("Stop-and-halt request received; " - "halting in ~p milliseconds~n", - [SleepTime]), - timer:sleep(SleepTime), - init:stop() - end), - case catch stop() of _ -> ok end. + try + stop() + after + init:stop() + end, + ok. status() -> [{running_applications, application:which_applications()}] ++ diff --git a/src/rabbit_restartable_sup.erl b/src/rabbit_restartable_sup.erl index bc6f40da6b..2f90cb9931 100644 --- a/src/rabbit_restartable_sup.erl +++ b/src/rabbit_restartable_sup.erl @@ -37,6 +37,8 @@ -export([init/1]). +-include("rabbit.hrl"). + -define(SERVER, ?MODULE). start_link() -> @@ -46,8 +48,9 @@ start_child(Mod) -> start_child(Mod, []). start_child(Mod, Args) -> - {ok, _} = supervisor:start_child(?SERVER, {Mod, {Mod, start_link, Args}, - transient, 100, worker, [Mod]}), + {ok, _} = supervisor:start_child(?SERVER, + {Mod, {Mod, start_link, Args}, + transient, ?MAX_WAIT, worker, [Mod]}), ok. init([]) -> diff --git a/src/rabbit_sup.erl b/src/rabbit_sup.erl index 7525db41b0..03fc9fb96e 100644 --- a/src/rabbit_sup.erl +++ b/src/rabbit_sup.erl @@ -37,6 +37,8 @@ -export([init/1]). +-include("rabbit.hrl"). + -define(SERVER, ?MODULE). start_link() -> @@ -46,8 +48,9 @@ start_child(Mod) -> start_child(Mod, []). start_child(Mod, Args) -> - {ok, _} = supervisor:start_child(?SERVER, {Mod, {Mod, start_link, Args}, - transient, 100, worker, [Mod]}), + {ok, _} = supervisor:start_child(?SERVER, + {Mod, {Mod, start_link, Args}, + transient, ?MAX_WAIT, worker, [Mod]}), ok. init([]) -> diff --git a/src/tcp_listener_sup.erl b/src/tcp_listener_sup.erl index 0fe1542616..b1526d5e93 100644 --- a/src/tcp_listener_sup.erl +++ b/src/tcp_listener_sup.erl @@ -37,6 +37,8 @@ -export([init/1]). +-include("rabbit.hrl"). + start_link(IPAddress, Port, SocketOpts, OnStartup, OnShutdown, AcceptCallback, Label) -> start_link(IPAddress, Port, SocketOpts, OnStartup, OnShutdown, @@ -63,4 +65,4 @@ init({IPAddress, Port, SocketOpts, OnStartup, OnShutdown, [IPAddress, Port, SocketOpts, ConcurrentAcceptorCount, Name, OnStartup, OnShutdown, Label]}, - transient, 100, worker, [tcp_listener]}]}}. + transient, ?MAX_WAIT, worker, [tcp_listener]}]}}. |
