Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Close the listening sockets. Apparently this allows faster restarts.

  • Loading branch information...
commit 6c68df4f32aa00fa7423e17c30a68ea880567689 1 parent 8b58723
@antirez authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/redis.c
View
4 src/redis.c
@@ -1157,6 +1157,10 @@ int prepareForShutdown() {
redisLog(REDIS_NOTICE,"Removing the pid file.");
unlink(server.pidfile);
}
+ /* Close the listening sockets. Apparently this allows faster restarts. */
+ if (server.ipfd != -1) close(server.ipfd);
+ if (server.sofd != -1) close(server.sofd);
+
redisLog(REDIS_WARNING,"Redis is now ready to exit, bye bye...");
return REDIS_OK;
}
Please sign in to comment.
Something went wrong with that request. Please try again.