Skip to content

Commit

Permalink
Pass an {M, F, A} as loop instead of a fun
Browse files Browse the repository at this point in the history
  • Loading branch information
mmzeeman committed May 15, 2014
1 parent 844759e commit 0a483d6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/webmachine_mochiweb.erl
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ start(Name, Options) ->
{dispatcher, Dispatcher}],

mochiweb_http:start([{name, Name},
{loop, fun(MochiReq) ->
?MODULE:loop(MochiReq, LoopOpts)
end} | Options2]).
{loop, {?MODULE, loop, [LoopOpts]}} | Options2]).

stop() ->
{registered_name, PName} = process_info(self(), registered_name),
Expand Down

0 comments on commit 0a483d6

Please sign in to comment.