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
ad223e20
Commit
ad223e20
authored
Mar 13, 2019
by
vattezhang
Browse files
fix: fix benchmark cannot exit when NOAUTH err happens
parent
31110f1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-benchmark.c
View file @
ad223e20
...
@@ -419,11 +419,10 @@ static void readHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
...
@@ -419,11 +419,10 @@ static void readHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
fprintf
(
stderr
,
"Error: %s
\n
"
,
c
->
context
->
errstr
);
fprintf
(
stderr
,
"Error: %s
\n
"
,
c
->
context
->
errstr
);
exit
(
1
);
exit
(
1
);
}
}
else
if
(
strlen
(
c
->
context
->
reader
->
buf
)
>=
32
else
if
(
NULL
!=
strstr
(
c
->
context
->
reader
->
buf
,
"NOAUTH"
))
&&
!
strncmp
(
c
->
context
->
reader
->
buf
,
"-NOAUTH Authentication required."
,
32
))
{
{
fprintf
(
stderr
,
"Error: %s
\n
"
,
c
->
context
->
reader
->
buf
);
fprintf
(
stderr
,
"Error: %s
\n
"
,
c
->
context
->
reader
->
buf
);
exit
(
1
);
exit
(
1
);
}
else
{
}
else
{
while
(
c
->
pending
)
{
while
(
c
->
pending
)
{
if
(
redisGetReply
(
c
->
context
,
&
reply
)
!=
REDIS_OK
)
{
if
(
redisGetReply
(
c
->
context
,
&
reply
)
!=
REDIS_OK
)
{
...
...
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