mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Fix for the previous port 0 patch, thanks to Pieter for noticing the error
This commit is contained in:
parent
68d6345ddf
commit
a53b4c2409
10
src/redis.c
10
src/redis.c
@ -865,12 +865,12 @@ void initServer() {
|
||||
server.el = aeCreateEventLoop();
|
||||
server.db = zmalloc(sizeof(redisDb)*server.dbnum);
|
||||
|
||||
if (server.port != 0)
|
||||
if (server.port != 0) {
|
||||
server.ipfd = anetTcpServer(server.neterr,server.port,server.bindaddr);
|
||||
|
||||
if (server.ipfd == ANET_ERR) {
|
||||
redisLog(REDIS_WARNING, "Opening port: %s", server.neterr);
|
||||
exit(1);
|
||||
if (server.ipfd == ANET_ERR) {
|
||||
redisLog(REDIS_WARNING, "Opening port: %s", server.neterr);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
if (server.unixsocket != NULL) {
|
||||
unlink(server.unixsocket); /* don't care if this fails */
|
||||
|
Loading…
x
Reference in New Issue
Block a user