I have a client application that is trying to connect to a server. The
server is not listening at present. The connect() call fails and after
a short period of time the client attempts to re-connect. The
procedure should be repeated until a connection with the server is
establish. However after a couple of attempts, the socket() call fails
and no further attempts to re-connect can be executed.
How can I overcome this problem?