Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2903c56b
Unverified
Commit
2903c56b
authored
May 10, 2019
by
Salvatore Sanfilippo
Committed by
GitHub
May 10, 2019
Browse files
Merge pull request #6073 from yossigo/fix/blocked-client-id
Preserve client->id for blocked clients.
parents
6b490e33
9f367988
Changes
1
Show whitespace changes
Inline
Side-by-side
src/module.c
View file @
2903c56b
...
@@ -3866,7 +3866,10 @@ RedisModuleCtx *RM_GetThreadSafeContext(RedisModuleBlockedClient *bc) {
...
@@ -3866,7 +3866,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;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment