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
e2046b30
Commit
e2046b30
authored
Jun 08, 2020
by
Oran Agra
Committed by
antirez
Jun 09, 2020
Browse files
Don't queue commands in an already aborted MULTI state
parent
b35fdf1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/multi.c
View file @
e2046b30
...
...
@@ -58,6 +58,13 @@ void queueMultiCommand(client *c) {
multiCmd
*
mc
;
int
j
;
/* No sense to waste memory if the transaction is already aborted.
* this is useful in case client sends these in a pipeline, or doesn't
* bother to read previous responses and didn't notice the multi was already
* aborted. */
if
(
c
->
flags
&
CLIENT_DIRTY_EXEC
)
return
;
c
->
mstate
.
commands
=
zrealloc
(
c
->
mstate
.
commands
,
sizeof
(
multiCmd
)
*
(
c
->
mstate
.
count
+
1
));
mc
=
c
->
mstate
.
commands
+
c
->
mstate
.
count
;
...
...
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