X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/21dbc6499a538af07f52a41742cf1683f3fc9c23..e902b579b4eb5f695680427cb34725159a4fa64f:/src/aof.c 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);