GPtrArray *cur_keys;
struct upstream *selected;
guint inflight;
+ gboolean wanna_die;
};
#define GET_TASK_ELT(task, elt) (task == NULL ? NULL : (task)->elt)
guint i;
gchar *k;
- if (cbdata) {
+ if (cbdata && !cbdata->wanna_die) {
+ /* Avoid double frees */
+ cbdata->wanna_die = TRUE;
redisAsyncFree (cbdata->redis);
for (i = 0; i < cbdata->cur_keys->len; i ++) {
ucl_object_t *obj;
gulong num = 0;
+ if (cbdata->wanna_die) {
+ return;
+ }
+
cbdata->inflight --;
if (c->err == 0 && r != NULL) {
ucl_object_t *obj;
glong num = 0;
+ if (cbdata->wanna_die) {
+ return;
+ }
+
cbdata->inflight --;
if (c->err == 0 && r != NULL) {
gchar **pk, *k;
guint i, processed = 0;
+
+ if (cbdata->wanna_die) {
+ return;
+ }
+
cbdata->inflight --;
if (c->err == 0 && r != NULL) {