cpp-redis / cpp_redis

C++11 Lightweight Redis client: async, thread-safe, no dependency, pipelining, multi-platform
MIT License
713 stars 198 forks source link

sentinel::slaves not showing slave info? #30

Open baldmice opened 5 years ago

baldmice commented 5 years ago

I setup a master with two slaves and using three sentinels. I can connect using sentinel without any issue. However, when I'm querying slave status as below: client.get_sentinel().slaves(, [](const reply& reply) { std::cout << reply << std::endl; }).sync_commit(1s); I always get "connect error: tcp_client is disconnected" exception. Is this known issue or I am doing something wrong?

baldmice commented 5 years ago

Weird, seems like need to always do an extra client.get_sentinel().connect_sentinel() before the query. Is that intended? The client.connect(master) internally already does that, but then still need to re-connect sentinels?