From 1af77d45e3452130742bde5be1c5271bfd80cfbf Mon Sep 17 00:00:00 2001 From: Steven Gravell Date: Fri, 28 Oct 2011 16:31:29 +0100 Subject: fix supervisor spec for non dynamic modules a release upgrade on a vm running cowboy where any other appup includes an {update, Mod, {advanced, Extra}} instruction will hang forever due to these child specs being wrong. The gen_servers should be [Mod] and the non gen_server needs to be [] since there is no callback to handle this. --- src/cowboy_listener_sup.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cowboy_listener_sup.erl') diff --git a/src/cowboy_listener_sup.erl b/src/cowboy_listener_sup.erl index adf5262..aca2b0b 100644 --- a/src/cowboy_listener_sup.erl +++ b/src/cowboy_listener_sup.erl @@ -27,7 +27,7 @@ start_link(NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts) -> {ok, SupPid} = supervisor:start_link(?MODULE, []), {ok, ListenerPid} = supervisor:start_child(SupPid, {cowboy_listener, {cowboy_listener, start_link, []}, - permanent, 5000, worker, dynamic}), + permanent, 5000, worker, [cowboy_listener]}), {ok, ReqsPid} = supervisor:start_child(SupPid, {cowboy_requests_sup, {cowboy_requests_sup, start_link, []}, permanent, 5000, supervisor, [cowboy_requests_sup]}), -- cgit v1.2.3