X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/21dbc6499a538af07f52a41742cf1683f3fc9c23..8df3dcada5e34c6a99666931ee6dcccd57685353:/src/aof.c?ds=sidebyside diff --git a/src/aof.c b/src/aof.c index 4dbce394..2396ba2c 100644 --- 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);