Oh totally agree, I wrote this client to test my other server code, but I
should do the reverse as well. It's on my todo list :)

Will ping you again after I try this out tomorrow.


On Thu, Mar 21, 2013 at 9:57 PM, Max Lapshin <notifications@github.com>wrote:

> In src/websocket_client.erl:
>
> > @@ -97,6 +77,13 @@ ws_client_init(Handler, Protocol, Host, Port, Path, Args) ->
> >                                              {packet, 0}
> >                                             ], 6000)
> >                     end,
> > +    {ok, Socket} = case SockReply of
> > +      {ok, Sock} -> {ok, Sock};
> > +      {error, _} = ConnectError ->
> > +        proc_lib:init_ack(ConnectError),
> > +        exit(normal)
> > +    end,
> > +    proc_lib:init_ack({ok, self()}),
>
> Ok, it can wait. And we should really add some tests at least with cowboy
> =) Transport:recv can also take a lot of time, but perhaps it is still a
> good idea to move init_ack down
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/jeremyong/websocket_client/pull/3/files#r3484517>
> .
>