Commit 1ca8deeb authored by Nathan Florea's avatar Nathan Florea Committed by antirez
Browse files

Unlink Unix socket file on shutdown

parent b7f667b5
......@@ -1170,6 +1170,10 @@ int prepareForShutdown() {
/* Close the listening sockets. Apparently this allows faster restarts. */
if (server.ipfd != -1) close(server.ipfd);
if (server.sofd != -1) close(server.sofd);
if (server.unixsocket) {
redisLog(REDIS_NOTICE,"Removing the unix socket file.");
unlink(server.unixsocket); /* don't care if this fails */
}
redisLog(REDIS_WARNING,"Redis is now ready to exit, bye bye...");
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