Skip to content
This repository was archived by the owner on Apr 6, 2019. It is now read-only.
This repository was archived by the owner on Apr 6, 2019. It is now read-only.

smembers return  #9

Description

@lulumahot

Hello,
I need to request a redis db containing sets.
I think there is a problem with smembers and its return values :

std::vector<int> el; client.smembers(key), [&] (cpp_redis::reply& reply) { std::vector<cpp_redis::reply> rep = reply.as_array(); for (auto it = rep.begin(); it != rep.end(); it++){ el.push_back(std::stoi(it->as_string())); } }); client.commit();

I get pieces of the good answer and then segfault or memory error if i use this code. But if I put a sleep(1) before (or after) client.commit(); it's ok.

So I think the problem is the client is not reading returned values as far as they're sent. I can't use a sleep(1) because of my application.

Have you ever experienced that ? Thank you for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions