Skip to content

Commit 6afe1b7

Browse files
JakubVaneksfan5
authored andcommittedSep 3, 2017
Add support for Redis via UNIX domain sockets (#46)
1 parent 25d1d43 commit 6afe1b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎db-redis.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ DBRedis::DBRedis(const std::string &mapdir)
5353
}
5454
const char *addr = tmp.c_str();
5555
int port = stoi64(get_setting_default("redis_port", ifs, "6379"));
56-
ctx = redisConnect(addr, port);
56+
ctx = tmp.find('/') != std::string::npos ? redisConnectUnix(addr) : redisConnect(addr, port);
5757
if(!ctx)
5858
throw std::runtime_error("Cannot allocate redis context");
5959
else if(ctx->err) {

0 commit comments

Comments
 (0)
Please sign in to comment.