File 0647-Add-a-note-about-timeouts-on-gen_tcp-connect-3-4.patch of Package erlang

From 2b5b0eb0115f59f652c3e882b3f5e48920b8bd24 Mon Sep 17 00:00:00 2001
From: Brujo Benavides <elbrujohalcon@gmail.com>
Date: Fri, 22 Mar 2019 07:21:43 -0300
Subject: [PATCH 1/2] 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).
---
 lib/kernel/doc/src/gen_tcp.xml | 6 ++++++
 1 file changed, 6 insertions(+)

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
@@ -258,6 +258,12 @@ do_recv(Sock, Bs) ->
 {tcp_error, Socket, Reason}</code>
         <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
-- 
2.16.4

openSUSE Build Service is sponsored by