]> git.saurik.com Git - redis.git/blobdiff - src/aof.c
top level make clean also clean hiredis and linoise (deps)
[redis.git] / src / aof.c
index 4dbce394c821930cab09da3a79ed0b8c26187626..2396ba2c553183f6baaf7837c60e9aac8d971459 100644 (file)
--- a/src/aof.c
+++ b/src/aof.c
@@ -549,7 +549,8 @@ int rewriteAppendOnlyFileBackground(void) {
         char tmpfile[256];
 
         if (server.vm_enabled) vmReopenSwapFile();
-        close(server.fd);
+        if (server.ipfd > 0) close(server.ipfd);
+        if (server.sofd > 0) close(server.sofd);
         snprintf(tmpfile,256,"temp-rewriteaof-bg-%d.aof", (int) getpid());
         if (rewriteAppendOnlyFile(tmpfile) == REDIS_OK) {
             _exit(0);