Fix module test failures with blocked clients

Former-commit-id: 18ec4b8600ea3462843b58a0f0e917824dfd7ff3
This commit is contained in:
John Sully 2021-12-23 02:10:20 -05:00
parent 373f584465
commit 129f27f751

View File

@ -4291,7 +4291,14 @@ RedisModuleCallReply *RM_Call(RedisModuleCtx *ctx, const char *cmdname, const ch
if (!(flags & REDISMODULE_ARGV_NO_REPLICAS))
call_flags |= CMD_CALL_PROPAGATE_REPL;
}
{
aeAcquireLock();
std::unique_lock<fastlock> ul(c->lock);
call(c,call_flags);
aeReleaseLock();
}
g_pserver->replication_allowed = prev_replication_allowed;
serverAssert((c->flags & CLIENT_BLOCKED) == 0);