Skip to content

Commit

Permalink
Add support for Redis via UNIX domain sockets (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubVanek authored and sfan5 committed Sep 3, 2017
1 parent 25d1d43 commit 6afe1b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db-redis.cpp
Expand Up @@ -53,7 +53,7 @@ DBRedis::DBRedis(const std::string &mapdir)
}
const char *addr = tmp.c_str();
int port = stoi64(get_setting_default("redis_port", ifs, "6379"));
ctx = redisConnect(addr, port);
ctx = tmp.find('/') != std::string::npos ? redisConnectUnix(addr) : redisConnect(addr, port);
if(!ctx)
throw std::runtime_error("Cannot allocate redis context");
else if(ctx->err) {
Expand Down

0 comments on commit 6afe1b7

Please sign in to comment.