mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Cluster: ASKING command fixed, state was not retained.
This commit is contained in:
parent
b8d8b9ec41
commit
9ec1b709f5
@ -816,12 +816,16 @@ void sendReplyToClient(aeEventLoop *el, int fd, void *privdata, int mask) {
|
|||||||
|
|
||||||
/* resetClient prepare the client to process the next command */
|
/* resetClient prepare the client to process the next command */
|
||||||
void resetClient(redisClient *c) {
|
void resetClient(redisClient *c) {
|
||||||
|
redisCommandProc *prevcmd = c->cmd ? c->cmd->proc : NULL;
|
||||||
|
|
||||||
freeClientArgv(c);
|
freeClientArgv(c);
|
||||||
c->reqtype = 0;
|
c->reqtype = 0;
|
||||||
c->multibulklen = 0;
|
c->multibulklen = 0;
|
||||||
c->bulklen = -1;
|
c->bulklen = -1;
|
||||||
/* We clear the ASKING flag as well if we are not inside a MULTI. */
|
/* We clear the ASKING flag as well if we are not inside a MULTI, and
|
||||||
if (!(c->flags & REDIS_MULTI)) c->flags &= (~REDIS_ASKING);
|
* if what we just executed is not the ASKING command itself. */
|
||||||
|
if (!(c->flags & REDIS_MULTI) && prevcmd != askingCommand)
|
||||||
|
c->flags &= (~REDIS_ASKING);
|
||||||
}
|
}
|
||||||
|
|
||||||
int processInlineBuffer(redisClient *c) {
|
int processInlineBuffer(redisClient *c) {
|
||||||
|
Loading…
Reference in New Issue
Block a user