Open dhruvkakadiya opened 4 years ago
As per xrevrange documentation, to get number of elements from given stream "COUNT" word needs to be there before actual value which is missing in current code.
Current code:
client & client::xrevrange(const std::string &key, const range_options_t &range_args, const reply_callback_t &reply_callback) { std::vector<std::string> cmd = {"XREVRANGE", key, range_args.Start, range_args.Stop}; if (range_args.Count > 0) { cmd.emplace_back(std::to_string(range_args.Count)); } send(cmd, reply_callback); return *this; }
Fixed code:
client & client::xrevrange(const std::string &key, const range_options_t &range_args, const reply_callback_t &reply_callback) { std::vector<std::string> cmd = {"XREVRANGE", key, range_args.Start, range_args.Stop}; if (range_args.Count > 0) { cmd.emplace_back("COUNT"); cmd.push_back(std::to_string(range_args.Count)); } send(cmd, reply_callback); return *this; }
As per xrevrange documentation, to get number of elements from given stream "COUNT" word needs to be there before actual value which is missing in current code.
Current code:
Fixed code: