From 977e3384e57e4aab98f2894b4d38092be4a5c7cb Mon Sep 17 00:00:00 2001 From: Michael Haardt Date: Thu, 21 Aug 2014 17:06:07 -0500 Subject: [PATCH] connect.2: Note that a new socket should be used if connect() fails Signed-off-by: Michael Kerrisk --- man2/connect.2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/man2/connect.2 b/man2/connect.2 index 04b15f3ba..d0f05d024 100644 --- a/man2/connect.2 +++ b/man2/connect.2 @@ -267,6 +267,12 @@ Some POSIX confusion resulted in the present also used by glibc. See also .BR accept (2). + +If +.B connect() +fails, consider the state of the socket as unspecified. +Portable applications should close the socket and create a new one for +reconnecting. .SH EXAMPLE An example of the use of .BR connect ()