Permalink
Browse files

remove fdsrv support, bump version to 2.0.0 since this is backwards i…

…ncompatible
  • Loading branch information...
1 parent f229da3 commit 98ac050c7eac180641ca6363187b07acc3b7ec90 @etrepum etrepum committed Mar 25, 2011
Showing with 5 additions and 31 deletions.
  1. +1 −0 .gitignore
  2. +1 −1 src/mochiweb.app.src
  3. +3 −30 src/mochiweb_socket_server.erl
View
@@ -5,3 +5,4 @@
/docs
.DS_Store
/TEST-*.xml
+/deps
View
@@ -1,7 +1,7 @@
%% This is generated from src/mochiweb.app.src
{application, mochiweb,
[{description, "MochiMedia Web Server"},
- {vsn, "1.5.2"},
+ {vsn, "2.0.0"},
{modules, []},
{registered, []},
{mod, {mochiweb_app, []}},
@@ -165,27 +165,7 @@ init(State=#mochiweb_socket_server{ip=Ip, port=Port, backlog=Backlog, nodelay=No
{_, _, _, _, _, _, _, _} -> % IPv6
[inet6, {ip, Ip} | BaseOpts]
end,
- case listen(Port, Opts, State) of
- {stop, eacces} ->
- case Port < 1024 of
- true ->
- case catch fdsrv:start() of
- {ok, _} ->
- case fdsrv:bind_socket(tcp, Port) of
- {ok, Fd} ->
- listen(Port, [{fd, Fd} | Opts], State);
- _ ->
- {stop, fdsrv_bind_failed}
- end;
- _ ->
- {stop, fdsrv_start_failed}
- end;
- false ->
- {stop, eacces}
- end;
- Other ->
- Other
- end.
+ listen(Port, Opts, State).
new_acceptor_pool(Listen,
State=#mochiweb_socket_server{acceptor_pool=Pool,
@@ -271,15 +251,8 @@ handle_cast(stop, State) ->
terminate(Reason, State) when ?is_old_state(State) ->
terminate(Reason, upgrade_state(State));
-terminate(_Reason, #mochiweb_socket_server{listen=Listen, port=Port}) ->
- mochiweb_socket:close(Listen),
- case Port < 1024 of
- true ->
- catch fdsrv:stop(),
- ok;
- false ->
- ok
- end.
+terminate(_Reason, #mochiweb_socket_server{listen=Listen}) ->
+ mochiweb_socket:close(Listen).
code_change(_OldVsn, State, _Extra) ->
State.

0 comments on commit 98ac050

Please sign in to comment.