A technique for recovering from a socket error at a computer host. The
host opens two sockets for communicating with respective sockets at
another host. Failure recovery processes are provided for a client host
on its server-initiated receive socket and its client-initiated send
socket, and for a server host on its server-initiated receive socket and
its client-initiated send socket. A failure may be cause by an operating
system error, a lack of communication at the socket, or removal or
failure of a communication medium such as a cable. When a failure
condition is detected at one socket, the host attempts to use the other
socket. If the other socket can be used, an attempt is made to reconnect
the failed socket. An internal state is set at the host denoting a normal
mode or an attempt to recover mode.