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
3d76f3fe
Commit
3d76f3fe
authored
Dec 28, 2010
by
Pieter Noordhuis
Browse files
Add write event after setting connect callback
parent
2c17d2e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
async.c
View file @
3d76f3fe
...
...
@@ -96,6 +96,11 @@ int redisAsyncSetReplyObjectFunctions(redisAsyncContext *ac, redisReplyObjectFun
int
redisAsyncSetConnectCallback
(
redisAsyncContext
*
ac
,
redisConnectCallback
*
fn
)
{
if
(
ac
->
onConnect
==
NULL
)
{
ac
->
onConnect
=
fn
;
/* The common way to detect an established connection is to wait for
* the first write event to be fired. This assumes the related event
* library functions are already set. */
if
(
ac
->
evAddWrite
)
ac
->
evAddWrite
(
ac
->
_adapter_data
);
return
REDIS_OK
;
}
return
REDIS_ERR
;
...
...
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