mochi / mochiweb

MochiWeb is an Erlang library for building lightweight HTTP servers.
Other
1.87k stars 473 forks source link

patch #30

Closed kostis closed 13 years ago

kostis commented 13 years ago

The following code is more kosher for what you want to do there and also shuts off a dialyzer warning.

 diff --git a/src/mochiweb_sup.erl b/src/mochiweb_sup.erl
 index af7df9b..8a3e65f 100644
 --- a/src/mochiweb_sup.erl
 +++ b/src/mochiweb_sup.erl
 @@ -23,8 +23,7 @@ start_link() ->
  %% @doc Add processes if necessary.
  upgrade() ->
      {ok, {_, Specs}} = init([]),
 -    [supervisor:start_child(?MODULE, Spec) || Spec  - Specs],
 -    ok.
 +    lists:foreach(fun(S) -> supervisor:start_child(?MODULE, S) end, Specs).

  %% @spec init([]) -> SupervisorTree
  %% @doc supervisor callback, ensures yaws is in embedded mode and then

Kostis

etrepum commented 13 years ago

cd7e256