diff options
author | Yossi Gottlieb <yossigo@gmail.com> | 2019-05-05 20:32:53 +0300 |
---|---|---|
committer | Yossi Gottlieb <yossigo@gmail.com> | 2019-05-05 20:32:53 +0300 |
commit | 9f3679880a7cebc3ce73142e2e19ae3e1150f457 (patch) | |
tree | cc62cfba8c21999026e2c03dd94de91f6eec3b4d /src | |
parent | 0a6090bfd8fbec26f682ff0a1dc7a43699e0c9b7 (diff) | |
download | redis-9f3679880a7cebc3ce73142e2e19ae3e1150f457.tar.gz |
Preserve client->id for blocked clients.
Diffstat (limited to 'src')
-rw-r--r-- | src/module.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/module.c b/src/module.c index c29521670..7dee7e776 100644 --- a/src/module.c +++ b/src/module.c @@ -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; } |