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
5e2aa2ca
Commit
5e2aa2ca
authored
Jan 18, 2013
by
Jan-Erik Rediger
Committed by
antirez
Jan 19, 2013
Browse files
Always exit if connection fails.
This avoids unnecessary core dumps. Fixes antirez/redis#894
parent
a732d86f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
5e2aa2ca
...
...
@@ -1288,19 +1288,19 @@ int main(int argc, char **argv) {
/* Latency mode */
if
(
config
.
latency_mode
)
{
cliConnect
(
0
);
if
(
cliConnect
(
0
)
==
REDIS_ERR
)
exit
(
1
)
;
latencyMode
();
}
/* Slave mode */
if
(
config
.
slave_mode
)
{
cliConnect
(
0
);
if
(
cliConnect
(
0
)
==
REDIS_ERR
)
exit
(
1
)
;
slaveMode
();
}
/* Get RDB mode. */
if
(
config
.
getrdb_mode
)
{
cliConnect
(
0
);
if
(
cliConnect
(
0
)
==
REDIS_ERR
)
exit
(
1
)
;
getRDB
();
}
...
...
@@ -1312,7 +1312,7 @@ int main(int argc, char **argv) {
/* Find big keys */
if
(
config
.
bigkeys
)
{
cliConnect
(
0
);
if
(
cliConnect
(
0
)
==
REDIS_ERR
)
exit
(
1
)
;
findBigKeys
();
}
...
...
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