Fix the socket_open() routine so that it returns a non-zero error code
if it fails to connect.