Call aeStop on error conditions
This commit is contained in:
parent
fc55afb1b6
commit
af9bf16953
@ -21,18 +21,21 @@ void getCallback(redisAsyncContext *c, void *r, void *privdata) {
|
|||||||
void connectCallback(const redisAsyncContext *c, int status) {
|
void connectCallback(const redisAsyncContext *c, int status) {
|
||||||
if (status != REDIS_OK) {
|
if (status != REDIS_OK) {
|
||||||
printf("Error: %s\n", c->errstr);
|
printf("Error: %s\n", c->errstr);
|
||||||
|
aeStop(loop);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Connected...\n");
|
printf("Connected...\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void disconnectCallback(const redisAsyncContext *c, int status) {
|
void disconnectCallback(const redisAsyncContext *c, int status) {
|
||||||
if (status != REDIS_OK) {
|
if (status != REDIS_OK) {
|
||||||
printf("Error: %s\n", c->errstr);
|
printf("Error: %s\n", c->errstr);
|
||||||
|
aeStop(loop);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf("Disconnected...\n");
|
|
||||||
|
|
||||||
|
printf("Disconnected...\n");
|
||||||
aeStop(loop);
|
aeStop(loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user