Yes, it there is any error, it should return {error, _} = Error -> Error



On Mar 24, 2013, at 1:09 AM, Jeremy Ong wrote:

> In src/websocket_client.erl:
> 
> > -
> > --spec start_link(Handler :: module(), Protocol :: protocol(),
> > -                 Host :: list(), Port :: integer(), Path :: list(),
> > -                 Args :: list()) ->
> > -    pid().
> > -start_link(Handler, Protocol, Host, Port, Path, Args) ->
> > -    spawn_link(?MODULE, ws_client_init,
> > -               [Handler, Protocol, Host, Port, Path, Args]).
> > +-spec start_link(URL :: list(), Handler :: module(), Args :: list()) ->
> > +    {ok, pid()} | {error, term()}.
> > +start_link(URL, Handler, Args) ->
> > +  case http_uri:parse(URL, [{scheme_defaults, [{ws,80},{wss,443}]}]) of
> > +    {ok, {Protocol, _, Host, Port, Path, Query}} ->
> > +      proc_lib:start_link(?MODULE, ws_client_init,
> > +               [Handler, Protocol, Host, Port, Path ++ Query, Args]);
> > +    {error, _} = Error ->
> Should this be
> 
> Error -> Error
> based on your return typing?
> 
> —
> Reply to this email directly or view it on GitHub.
>