Skip to content
Permalink
Browse files

Add support for Redis via UNIX domain sockets (#46)

  • Loading branch information
JakubVanek authored and sfan5 committed Sep 3, 2017
1 parent 25d1d43 commit 6afe1b78c52b9de9f1b474ec044157159a455076
Showing with 1 addition and 1 deletion.
  1. +1 −1 db-redis.cpp
@@ -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) {

0 comments on commit 6afe1b7

Please sign in to comment.