public function setRetryLimit($attempts)
    {
        $this->retryLimit = (int) $attempts;
        $this->client->getConnection()->setRetryLimit($attempts);

        return $this;
    }
public function setRetryLimit($attempts)
    {
        $this->retryLimit = (int) $attempts;
        $this->client->getConnection()->setRetryLimit($attempts);

        return $this;
    }
public function setRetryLimit ( $ attempts ) { $ this -> retryLimit = ( int ) $ attempts ; $ this -> client -> getConnection ( ) -> setRetryLimit ( $ attempts ) ; return $ this ; }
Set the default number of attempts to retry a command when the client
fails to connect to a Redis instance behind Sentinel.

@param int $attempts With a value of 0, throw an exception after the
first failed attempt. Pass a value of -1 to retry connections forever.

@return $this The current instance for method chaining.
Set the default number of attempts to retry a command when the client fails to connect to a Redis instance behind Sentinel .