Option to limit retries when client goes offline

It’s due to the client going to sleep/shut down.