|
|
@ -96,6 +96,11 @@ pool_on_disconnect(const redisAsyncContext *ac, int status) {
|
|
|
|
|
|
|
|
|
|
|
|
struct pool *p = ac->data;
|
|
|
|
struct pool *p = ac->data;
|
|
|
|
int i = 0;
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(p == NULL) { /* no need to clean anything here. */
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (status != REDIS_OK) {
|
|
|
|
if (status != REDIS_OK) {
|
|
|
|
char format[] = "Error disconnecting: %s";
|
|
|
|
char format[] = "Error disconnecting: %s";
|
|
|
|
size_t msg_sz = sizeof(format) - 2 + ((ac && ac->errstr) ? strlen(ac->errstr) : 6);
|
|
|
|
size_t msg_sz = sizeof(format) - 2 + ((ac && ac->errstr) ? strlen(ac->errstr) : 6);
|
|
|
@ -107,10 +112,6 @@ pool_on_disconnect(const redisAsyncContext *ac, int status) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(p == NULL) { /* no need to clean anything here. */
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* remove from the pool */
|
|
|
|
/* remove from the pool */
|
|
|
|
for(i = 0; i < p->count; ++i) {
|
|
|
|
for(i = 0; i < p->count; ++i) {
|
|
|
|
if(p->ac[i] == ac) {
|
|
|
|
if(p->ac[i] == ac) {
|
|
|
|