[erlang-questions] (no subject)

Jonas Falkevik jonas.falkevik@REDACTED
Tue Sep 24 00:33:36 CEST 2013


Hi,
it looks like your OS is returning the posix's error code etimedout. Mening that the TCP connection timed out.
Most probably because you sent some data that could not be delivered within the your OS specified TCP retransmit / timer settings.

Did you send some data over the TCP connection at any time?

Jonas

On Sep 23, 2013, at 8:01 , Stefan Hellkvist wrote:

> Hi, 
> 
> Here is a question about why I sometimes get an etimedout error from gen_tcp:recv.
> 
> I open a tcp socket on the server side using lines like:
> 
> {ok, LSock} = gen_tcp:listen(Port, [binary, {packet, line}, {active, false}]),
> {ok, Sock} = gen_tcp:accept(LSock),
> do_recv(Sock).
> 
> 
> where do_recv is something like this:
> 
> 
> do_recv(Sock) ->
>     case gen_tcp:recv(Sock, 0) of
>         {ok, Data} ->
> 
>             do_recv(Sock); 
> 
>         {error, Reason} ->
>         ?DAWN_EVENT("tcp_bus got error and shut down: ~p", [Reason]),
>         telnet_subscriber:unsubscribe({Sock, self()})
>     end.
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list