Permalink
Browse files

Fix proper startup and stopping.

With this, you can stop the application properly.
  • Loading branch information...
1 parent 01ca03e commit b07a9560642b2ea0a59264794884351316c6dafd @jlouis jlouis committed Jul 4, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/pony_core_app.erl
@@ -10,10 +10,12 @@
%% ===================================================================
start(_StartType, _StartArgs) ->
- pony_core_sup:start_link(),
+ {ok, Pid} = pony_core_sup:start_link(),
ranch:start_listener(pony, 10,
ranch_tcp, [{port, 6667}, raw, binary, {active, false}],
- pony_client, []).
+ pony_client, []),
+ {ok, Pid}.
stop(_State) ->
+ ranch:stop_listener(pony),
ok.

0 comments on commit b07a956

Please sign in to comment.