mirror of
https://github.com/fluencelabs/redis
synced 2025-04-07 18:08:04 +00:00
Close the listening sockets. Apparently this allows faster restarts.
This commit is contained in:
parent
adae85cdae
commit
80e87a461a
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user