summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--example-ae.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/example-ae.c b/example-ae.c
index 0484a73..93f1a84 100644
--- a/example-ae.c
+++ b/example-ae.c
@@ -21,18 +21,21 @@ void getCallback(redisAsyncContext *c, void *r, void *privdata) {
void connectCallback(const redisAsyncContext *c, int status) {
if (status != REDIS_OK) {
printf("Error: %s\n", c->errstr);
+ aeStop(loop);
return;
}
+
printf("Connected...\n");
}
void disconnectCallback(const redisAsyncContext *c, int status) {
if (status != REDIS_OK) {
printf("Error: %s\n", c->errstr);
+ aeStop(loop);
return;
}
- printf("Disconnected...\n");
+ printf("Disconnected...\n");
aeStop(loop);
}