提交 80e87a46 编写于 作者: A antirez

Close the listening sockets. Apparently this allows faster restarts.

上级 adae85cd
...@@ -1190,6 +1190,10 @@ int prepareForShutdown() { ...@@ -1190,6 +1190,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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册