Permalink
Browse files

Fix for the previous port 0 patch, thanks to Pieter for noticing the …

…error
  • Loading branch information...
1 parent a36d524 commit 970e813be2baab80dc4efea2bc185d4b2d91f54a @antirez committed Feb 7, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/redis.c
View
@@ -853,12 +853,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 */

0 comments on commit 970e813

Please sign in to comment.