diff options
author | Brujo Benavides <[email protected]> | 2019-03-22 07:21:43 -0300 |
---|---|---|
committer | GitHub <[email protected]> | 2019-03-22 07:21:43 -0300 |
commit | 2b5b0eb0115f59f652c3e882b3f5e48920b8bd24 (patch) | |
tree | 1dd02646073e95dab1f97d51ea7dc71925dd8ac1 /lib/kernel | |
parent | 6b563c556828b40623967430cfdb0ad99d70ad69 (diff) | |
download | otp-2b5b0eb0115f59f652c3e882b3f5e48920b8bd24.tar.gz otp-2b5b0eb0115f59f652c3e882b3f5e48920b8bd24.tar.bz2 otp-2b5b0eb0115f59f652c3e882b3f5e48920b8bd24.zip |
Add a note about timeouts on gen_tcp:connect/3,4
Taken almost verbatim from @RaimoNiskanen's comment from [10 years ago](http://erlang.2086793.n4.nabble.com/strange-behaviour-of-gen-tcp-connect-tp2113918p2113920.html).
Diffstat (limited to 'lib/kernel')
-rw-r--r-- | lib/kernel/doc/src/gen_tcp.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/kernel/doc/src/gen_tcp.xml b/lib/kernel/doc/src/gen_tcp.xml index fc16473393..751dfcad1d 100644 --- a/lib/kernel/doc/src/gen_tcp.xml +++ b/lib/kernel/doc/src/gen_tcp.xml @@ -259,6 +259,12 @@ do_recv(Sock, Bs) -> <p>The optional <c><anno>Timeout</anno></c> parameter specifies a time-out in milliseconds. Defaults to <c>infinity</c>.</p> <note> + <p>Keep in mind that if the underlying OS <c>connect()</c> call returns + with a timeout, <c>gen_tcp:connect</c> will also return with a timeout + (i.e. <c>{error, etimedout}</c>), even if a larger <c>Timeout</c> was + specified.</p> + </note> + <note> <p>The default values for options specified to <c>connect</c> can be affected by the Kernel configuration parameter <c>inet_default_connect_options</c>. For details, see |