Commit e08c9c15 authored by Yossi Gottlieb's avatar Yossi Gottlieb Committed by antirez
Browse files

Preserve client->id for blocked clients.

parent c6b1252f
...@@ -3824,7 +3824,10 @@ RedisModuleCtx *RM_GetThreadSafeContext(RedisModuleBlockedClient *bc) { ...@@ -3824,7 +3824,10 @@ RedisModuleCtx *RM_GetThreadSafeContext(RedisModuleBlockedClient *bc) {
* in order to keep things like the currently selected database and similar * in order to keep things like the currently selected database and similar
* things. */ * things. */
ctx->client = createClient(-1); 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; return ctx;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment