We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25d1d43 commit 6afe1b7Copy full SHA for 6afe1b7
db-redis.cpp
@@ -53,7 +53,7 @@ DBRedis::DBRedis(const std::string &mapdir)
53
}
54
const char *addr = tmp.c_str();
55
int port = stoi64(get_setting_default("redis_port", ifs, "6379"));
56
- ctx = redisConnect(addr, port);
+ ctx = tmp.find('/') != std::string::npos ? redisConnectUnix(addr) : redisConnect(addr, port);
57
if(!ctx)
58
throw std::runtime_error("Cannot allocate redis context");
59
else if(ctx->err) {
0 commit comments