Merge pull request #6073 from yossigo/fix/blocked-client-id

Preserve client->id for blocked clients.
This commit is contained in:
Salvatore Sanfilippo
2019-05-10 12:32:47 +02:00
committed by GitHub

View File

@@ -3866,7 +3866,10 @@ RedisModuleCtx *RM_GetThreadSafeContext(RedisModuleBlockedClient *bc) {
* in order to keep things like the currently selected database and similar
* things. */
ctx->client = createClient(-1);
if (bc) selectDb(ctx->client,bc->dbid);
if (bc) {
selectDb(ctx->client,bc->dbid);
ctx->client->id = bc->client->id;
}
return ctx;
}