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
2bf8c2c1
Commit
2bf8c2c1
authored
Sep 28, 2017
by
antirez
Browse files
Limit statement in RM_BlockClient() to 80 cols.
parent
54ad626c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
2bf8c2c1
...
@@ -3407,8 +3407,8 @@ RedisModuleBlockedClient *RM_BlockClient(RedisModuleCtx *ctx, RedisModuleCmdFunc
...
@@ -3407,8 +3407,8 @@ RedisModuleBlockedClient *RM_BlockClient(RedisModuleCtx *ctx, RedisModuleCmdFunc
RedisModuleBlockedClient
*
bc
=
c
->
bpop
.
module_blocked_handle
;
RedisModuleBlockedClient
*
bc
=
c
->
bpop
.
module_blocked_handle
;
/* We need to handle the invalid operation of calling modules blocking
/* We need to handle the invalid operation of calling modules blocking
* commands from Lua or MULTI. We actually create an already aborted
* commands from Lua or MULTI. We actually create an already aborted
* (client set to NULL) blocked client handle, and actually reply with
* (client set to NULL) blocked client handle, and actually reply with
* an error. */
* an error. */
bc
->
client
=
(
islua
||
ismulti
)
?
NULL
:
c
;
bc
->
client
=
(
islua
||
ismulti
)
?
NULL
:
c
;
bc
->
module
=
ctx
->
module
;
bc
->
module
=
ctx
->
module
;
...
@@ -3423,8 +3423,9 @@ RedisModuleBlockedClient *RM_BlockClient(RedisModuleCtx *ctx, RedisModuleCmdFunc
...
@@ -3423,8 +3423,9 @@ RedisModuleBlockedClient *RM_BlockClient(RedisModuleCtx *ctx, RedisModuleCmdFunc
if
(
islua
||
ismulti
)
{
if
(
islua
||
ismulti
)
{
c
->
bpop
.
module_blocked_handle
=
NULL
;
c
->
bpop
.
module_blocked_handle
=
NULL
;
addReplyError
(
c
,
islua
?
"Blocking module command called from Lua script"
:
addReplyError
(
c
,
islua
?
"Blocking module command called from transaction"
);
"Blocking module command called from Lua script"
:
"Blocking module command called from transaction"
);
}
else
{
}
else
{
blockClient
(
c
,
BLOCKED_MODULE
);
blockClient
(
c
,
BLOCKED_MODULE
);
}
}
...
...
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