Merge pull request #7370 from oranagra/no_queue_in_aborted_multi
Don't queue commands in an already aborted MULTI state
This commit is contained in:
commit
254f06c131
@ -58,6 +58,13 @@ void queueMultiCommand(client *c) {
|
|||||||
multiCmd *mc;
|
multiCmd *mc;
|
||||||
int j;
|
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,
|
c->mstate.commands = zrealloc(c->mstate.commands,
|
||||||
sizeof(multiCmd)*(c->mstate.count+1));
|
sizeof(multiCmd)*(c->mstate.count+1));
|
||||||
mc = c->mstate.commands+c->mstate.count;
|
mc = c->mstate.commands+c->mstate.count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user