Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
9da6caac
Commit
9da6caac
authored
Oct 15, 2010
by
Pieter Noordhuis
Browse files
Don't reset the client when processCommand returns REDIS_ERR
parent
dc11daf3
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
9da6caac
...
@@ -820,9 +820,13 @@ void processInputBuffer(redisClient *c) {
...
@@ -820,9 +820,13 @@ void processInputBuffer(redisClient *c) {
}
}
/* Multibulk processing could see a <= 0 length. */
/* Multibulk processing could see a <= 0 length. */
if
(
c
->
argc
>
0
)
if
(
c
->
argc
==
0
)
{
processCommand
(
c
);
resetClient
(
c
);
resetClient
(
c
);
}
else
{
/* Only reset the client when the command was executed. */
if
(
processCommand
(
c
)
==
REDIS_OK
)
resetClient
(
c
);
}
}
}
}
}
...
...
src/redis.c
View file @
9da6caac
...
@@ -955,7 +955,7 @@ int processCommand(redisClient *c) {
...
@@ -955,7 +955,7 @@ int processCommand(redisClient *c) {
addReply
(
c
,
shared
.
queued
);
addReply
(
c
,
shared
.
queued
);
}
else
{
}
else
{
if
(
server
.
vm_enabled
&&
server
.
vm_max_threads
>
0
&&
if
(
server
.
vm_enabled
&&
server
.
vm_max_threads
>
0
&&
blockClientOnSwappedKeys
(
c
,
cmd
))
return
1
;
blockClientOnSwappedKeys
(
c
,
cmd
))
return
REDIS_ERR
;
call
(
c
,
cmd
);
call
(
c
,
cmd
);
}
}
return
REDIS_OK
;
return
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