Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
374401d7
Unverified
Commit
374401d7
authored
Apr 15, 2021
by
Wen Hui
Committed by
GitHub
Apr 15, 2021
Browse files
Avoid close before logging to preserve errno (#8703)
parent
7d749d81
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
374401d7
...
@@ -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 ======================= */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment