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
hiredis
Commits
be76c56b
Commit
be76c56b
authored
Jan 30, 2017
by
Hyungjin Kim
Browse files
Consider sub by pattern when clear subscribed flag
parent
073dc843
Changes
1
Hide whitespace changes
Inline
Side-by-side
async.c
View file @
be76c56b
...
@@ -407,7 +407,9 @@ static int __redisGetSubscribeCallback(redisAsyncContext *ac, redisReply *reply,
...
@@ -407,7 +407,9 @@ static int __redisGetSubscribeCallback(redisAsyncContext *ac, redisReply *reply,
assert
(
reply
->
element
[
2
]
->
type
==
REDIS_REPLY_INTEGER
);
assert
(
reply
->
element
[
2
]
->
type
==
REDIS_REPLY_INTEGER
);
/* Unset subscribed flag only when no pipelined pending subscribe. */
/* Unset subscribed flag only when no pipelined pending subscribe. */
if
(
reply
->
element
[
2
]
->
integer
==
0
&&
dictSize
(
callbacks
)
==
0
)
if
(
reply
->
element
[
2
]
->
integer
==
0
&&
dictSize
(
ac
->
sub
.
channels
)
==
0
&&
dictSize
(
ac
->
sub
.
patterns
)
==
0
)
c
->
flags
&=
~
REDIS_SUBSCRIBED
;
c
->
flags
&=
~
REDIS_SUBSCRIBED
;
}
}
}
}
...
...
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