Commit ec7bbadc authored by antirez's avatar antirez
Browse files

Close the listening sockets. Apparently this allows faster restarts.

parent 063923de
...@@ -1118,6 +1118,10 @@ int prepareForShutdown() { ...@@ -1118,6 +1118,10 @@ int prepareForShutdown() {
redisLog(REDIS_NOTICE,"Removing the pid file."); redisLog(REDIS_NOTICE,"Removing the pid file.");
unlink(server.pidfile); 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..."); redisLog(REDIS_WARNING,"Redis is now ready to exit, bye bye...");
return REDIS_OK; return REDIS_OK;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment