Adding client reconnect/retry logic.