Unverified Commit 374401d7 authored by Wen Hui's avatar Wen Hui Committed by GitHub
Browse files

Avoid close before logging to preserve errno (#8703)

parent 7d749d81
...@@ -2320,8 +2320,8 @@ void sentinelFlushConfig(void) { ...@@ -2320,8 +2320,8 @@ void sentinelFlushConfig(void) {
return; return;
werr: werr:
if (fd != -1) close(fd);
serverLog(LL_WARNING,"WARNING: Sentinel was not able to save the new configuration on disk!!!: %s", strerror(errno)); serverLog(LL_WARNING,"WARNING: Sentinel was not able to save the new configuration on disk!!!: %s", strerror(errno));
if (fd != -1) close(fd);
} }
/* ====================== hiredis connection handling ======================= */ /* ====================== hiredis connection handling ======================= */
......
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