Put a limit on the amount of retries and a timeout to prevent the client from retrying forever on a server that's simply switched-off or unreachable