When the time-out value associated with the socket expires, the socket function terminates with the ETIMEDOUT errno code. For more information about socket time-outs, see Associating Time-outs to Sockets.
After a CONNECT error, including a time-out condition, the corresponding socket cannot be used. For the application to continue processing, it must close the current socket and create a new socket.