lua_State *L;
struct rspamd_task *task;
struct event timeout;
- gint cbref;
gchar *server;
gchar *reqline;
- guint16 port;
gchar **args;
+ gint cbref;
guint nargs;
+ guint16 port;
+ guint16 terminated;
};
static void
struct lua_redis_userdata *ud = arg;
if (ud->ctx) {
+ ud->terminated = 1;
redisAsyncFree (ud->ctx);
lua_redis_free_args (ud);
event_del (&ud->timeout);
redisReply *reply = r;
struct lua_redis_userdata *ud = priv;
+ if (ud->terminated) {
+ /* We are already at the termination stage, just go out */
+ return;
+ }
+
if (c->err == 0) {
if (r != NULL) {
if (reply->type != REDIS_REPLY_ERROR) {
}
if (ret) {
+ ud->terminated = 0;
ud->ctx = redisAsyncConnect (rspamd_inet_address_to_string (addr->addr),
rspamd_inet_address_get_port (addr->addr));