Permalink
Browse files

fix issue #6 - shutdown

  • Loading branch information...
HenryRawas committed May 8, 2012
1 parent d15a370 commit 51804f1405f1793bbd720cfc0e3e55663103105b
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/redis.c
View
@@ -1191,8 +1191,13 @@ int prepareForShutdown() {
unlink(server.pidfile);
}
/* Close the listening sockets. Apparently this allows faster restarts. */
+#ifdef _WIN32
+ if (server.ipfd != -1) closesocket(server.ipfd);
+ if (server.sofd != -1) closesocket(server.sofd);
+#else
if (server.ipfd != -1) close(server.ipfd);
if (server.sofd != -1) close(server.sofd);
+#endif
if (server.unixsocket) {
redisLog(REDIS_NOTICE,"Removing the unix socket file.");
unlink(server.unixsocket); /* don't care if this fails */

0 comments on commit 51804f1

Please sign in to comment.