[erlang-questions] No timeout on connect
Sun Apr 5 06:15:09 CEST 2009
> What is wrong in this code ? When I run it, without a listening server, after a few second, I have a timeout error !!
> infinity parameter is not correctly defined ?
Which OS and Erlang release are you using? When I try that on R12B-5
for both Linux and Windows it returns quickly as well, but the Reason is
'econnrefused' which is what I'd expect to see when there's no server there.
The timeout parameter is how long the connection attempt will wait for a
response of any kind, be it success, refusal or some other kind of
failure. Setting it to 'infinity' (the default, by the way, so you
don't need to explicitly set it) doesn't mean that it will keep retrying
a failed connection indefinitely.
More information about the erlang-questions