From bc47fcb0491c62496e6afcdf68874ae97ce48623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 8 Jun 2011 12:30:13 +0200 Subject: [PATCH] Fix a dialyzer warning in egs_app. --- src/egs_app.erl | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/egs_app.erl b/src/egs_app.erl index e939ae9..1a975a1 100644 --- a/src/egs_app.erl +++ b/src/egs_app.erl @@ -29,20 +29,16 @@ %% API. --spec start(application_start_type(), term()) -> {ok, pid()} | {error, atom()}. +-spec start(application_start_type(), term()) -> {ok, pid()}. start(_Type, _StartArgs) -> - case egs_sup:start_link() of - {ok, Pid} -> - start_patch_listeners(egs_conf:read(patch_ports)), - start_login_listeners(egs_conf:read(login_ports)), - {_ServerIP, GamePort} = egs_conf:read(game_server), - {ok, _GamePid} = cowboy:start_listener({game, GamePort}, 10, - cowboy_ssl_transport, [{port, GamePort}] ++ ?SSL_OPTIONS, - egs_game_protocol, []), - {ok, Pid}; - {error, Reason} -> - {error, Reason} - end. + {ok, Pid} = egs_sup:start_link(), + start_patch_listeners(egs_conf:read(patch_ports)), + start_login_listeners(egs_conf:read(login_ports)), + {_ServerIP, GamePort} = egs_conf:read(game_server), + {ok, _GamePid} = cowboy:start_listener({game, GamePort}, 10, + cowboy_ssl_transport, [{port, GamePort}] ++ ?SSL_OPTIONS, + egs_game_protocol, []), + {ok, Pid}. -spec stop(term()) -> ok. stop(_State) ->