[erlang-questions] etimedout from gen_tcp:recv - or definition of infinity

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Mon Sep 23 10:34:53 CEST 2013


On Mon, Sep 23, 2013 at 8:10 AM, Stefan Hellkvist <hellkvist@REDACTED>wrote:

> According to the manual pages of gen_tcp all default values for timeout
> values are set to infinity which to me would imply that the connection can
> close and all that and experience other errors but I should at least never
> get a etimedout value unless the length of "infinity" is highly
> exaggerated.


While the Erlang VM will not result in a timeout, the underlying operating
system can send the ETIMEDOUT error (see man 2 recv). So even if you
specifically ask for a poll on the socket, there may still be an underlying
error propagating to you. The most probable reason for this has to do with
something low-level TCP connectivity. I would suggest running tcpdump on
the connection and inspect the data (perhaps in Wireshark).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130923/702e6d7a/attachment.htm>


More information about the erlang-questions mailing list