Below redis client program seg-faults on exit if redis-server is not available. I killed redis-server after the client started. Call stack from core dump is below.
#include <cpp_redis/cpp_redis>
#include <thread>
#include <chrono>
int main(void)
{
cpp_redis::client client;
client.connect("127.0.0.1", 6379, nullptr, 0, 10, 1000);
std::this_thread::sleep_for(std::chrono::seconds(5)); // kill redis-server during this sleep
client.cancel_reconnect();
return 0;
}
Below redis client program seg-faults on exit if redis-server is not available. I killed
redis-server
after the client started. Call stack from core dump is below.